try {
startActivity(new Intent(Intent.ACTION_VIEW,
Uri.parse("market://details?id=com.google.android.googlequicksearchbox")));
}catch (ActivityNotFoundException e)
{
startActivity(new Intent(Intent.ACTION_VIEW,
Uri.parse("https://play.google.com/store/apps/details...
Sunday, 29 July 2018
share button android studio
i = new Intent(Intent.ACTION_SEND);
i.setType("text/plain");
String shareBody="Downdload Arti Sangrah Here";
String shareSub="Arti Sangrah";
i.putExtra(Intent.EXTRA_SUBJECT,shareBody);
i.putExtra(Intent.EXTRA_TEXT,shareSub);
startActivity(Intent.createChooser(i,"SHARE...
Friday, 27 July 2018
read string value from resource
https://www.dev2qa.com/how-to-read-string-value-array-from-strings-xml-in-android/
<resources>
<string name="button_show_selection">Show Selection</string>
<string name="auto_complete_text_view_car">Input Favorite Car Name</string>
</resources>
String defaultInputText = getResources().getString(R.string.auto_complete_text_view_car);
Define a string...
intent data passing example
down vote
In your current Activity, create a new Intent:
String value="Hello world";
Intent i = new Intent(CurrentActivity.this, NewActivity.class);
i.putExtra("key",value);
startActivity(i);
Then in the new Activity, retrieve those values:
Bundle extras = getIntent().getExtras();
if...
Thursday, 26 July 2018
Arti App
xml file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
...
Tuesday, 24 July 2018
colour code
<color name="colorPrimary">#dd3333</color>
<color name="colorPrimaryDark">#d11616</color>
<color name="colorAccent">#FF4081</color>
<color name="colorWhite">#FFFFFF</color>
<color name="colorGrapeFruit">#ED5565</color>
<color name="colorGrapeFruitDark">#DA4453</color>
<color name="colorBitterSweet">#FC6E51</color>
...
Sunday, 22 July 2018
kotlin do while loop
fun main(args:Array<String>)
{
var counter=0 do {
println("hey")
counter ++
}
while (counter<=5)
}
OUTPUT
hey
hey
hey
hey
hey
hey
...
kotlin while loop
fun main(args:Array<String>)
{
var counter =0 while (counter<=5)
{
println("counting ...$counter")
counter++ // counter counter+1 }
println("out of loop")
}
counting ...0
counting ...1
counting ...2
counting ...3
counting ...4
counting ...5
out of l...
kotlin for loop
fun main(args:Array<String>)
{
for (item in 1..5)
{
println("hey theree $item")
}
}
OUTPUT
hey theree 1
hey theree 2
hey theree 3
hey theree 4
hey theree 5
fun main(args:Array<String>)
{
for (item in 0..6)
{
if (item % 2 ==0)
{//if...
kotlin when using read line
fun main(args:Array<String>)
{
println("ENTER A NO BETWEEN 1 - 10")
var enterno= readLine()!!.toInt()
when(enterno)
{
1-> println("WRONG NO 1")
2-> println("GET CLOSE 2")
3-> println("CLOSER 3" )
4-> println("HMM 4 ")
5->...
kotlin when
fun main(args:Array<String>)
{
var age:Int=19 age=16 when(age)
{
17-> println("17")
18-> println("18")
19-> println("yep 19")
else ->
{
println("none of the above")
}
}
}
OUTPUT none of the above...
Friday, 20 July 2018
kotlin if else statement
fun main(args:Array<String>)
{
var firstno=8 var secno=3
if (firstno>secno)
{
println("yes first no $firstno is graater that $secno")
}
else {
println("yes")
}
}
OUTPUT >>> yes first no 8 is graater that 3...
kotlin conditional operator
fun main(args:Array<String>)
{
val firstno=5 val secondno=6
println(firstno>secondno) //return a boolear true or false
println(firstno<secondno)
println(firstno==secondno)
println(firstno!=secondno)
println(firstno<=secondno)
println(firstno>=secondno)
}
OUTPUT...
KOTLIN CONVERTING DATA TYPE
fun main(args:Array<String>)
{
var age:Int=3
var bloodpressure=89.0
age=bloodpressure.toInt()
println(age)
}
OUTPUT >>> 89...
kotline increament and decrement operator
fun main(args:Array<String>)
{
var firstno=8 var secno=3
var incre=firstno+1 var dec=firstno-1 println(incre)
println(++firstno)
println(dec)
println(--firstno)
}
OUTPUT >>
9
9
7
8...
kotline remainder
fun main(args:Array<String>)
{
var firstno=8 var secno=3 var result:Int?
result=firstno%secno
println("THE RESULT IS $result")
//or println("THE RESULT IS ${firstno % secno }")
}
THE RESULT IS 2
THE RESULT IS 2
...
kotlin division
fun main(args:Array<String>)
{
var firstno=2 var secno=2 var result:Int?
result=firstno/secno
println("THE RESULT IS $result")
//or println("THE RESULT IS ${firstno / secno }")
}
THE RESULT IS 1
THE RESULT IS 1
Process finished with exit code 0...
Search This Blog
Categories
Popular Posts
-
https://github.com/Enteleform/-RES-/blob/master/%5BLinks%5D/%5BAndroid%5D%20Udacity%20Curriculum.md#full-curriculum-outline Full Curri...
-
'C:\Users\viraj\AppData\Local\Android\sdk\platform-tools\adb.exe,start-server' failed -- run manually if necessary Solution ...
-
how to make crores from 1 lakh in stock markets in 1 year
Pages
Blog Archive
-
▼
2018
(76)
-
▼
July
(33)
- adb.exe,start-server' failed — run manually if nec...
- KOTLIN HELLO WORLD PROGRAM
- comment in kotline
- kotline variable
- kotline variable type string
- kotlin int type
- kotlin double variable type
- kotlin Boolean
- kotlin Float
- Kotlin char variable type
- val and var diffrence in kotlin
- kotlin read line method
- kotlin addition of two no
- kotlin substraction
- kotlin multiplication
- kotlin division
- kotline remainder
- kotline increament and decrement operator
- KOTLIN CONVERTING DATA TYPE
- kotlin conditional operator
- kotlin if else statement
- kotlin when
- kotlin when using read line
- kotlin for loop
- kotlin while loop
- kotlin do while loop
- best design android
- colour code
- Arti App
- intent data passing example
- read string value from resource
- share button android studio
- rate us button android code
-
▼
July
(33)
how to make crores from 1 lakh in stock markets in 1 year
how to make crores from 1 lakh in stock markets in 1 year