Twitter Facebook Delicious Digg Stumbleupon Favorites More

Sunday, 29 July 2018

rate us button android code

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...
Share:

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...
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...
Share:

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...
Share:

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"> ...
Share:

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> ...
Share:

best design android

...
Share:

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 ...
Share:

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...
Share:

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...
Share:

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->...
Share:

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...
Share:

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...
Share:

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...
Share:

KOTLIN CONVERTING DATA TYPE

fun main(args:Array<String>) { var age:Int=3 var bloodpressure=89.0 age=bloodpressure.toInt() println(age) } OUTPUT >>> 89...
Share:

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...
Share:

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 ...
Share:

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...
Share:

Search This Blog

Popular Posts

Pages

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

Blogger Tutorials

Blogger Templates

Sample Text

Copyright © 2025 ANDROID TUTORIAL CODE | Powered by Blogger
Design by SimpleWpThemes | Blogger Theme by NewBloggerThemes.com & Distributed By Protemplateslab