Attribute | Description |
---|---|
progress | Value represented by the seek bar. |
min | Minimum progress value of seek bar |
max | Minimum progress value of seek bar |
Boolean Byte Char Double Float Int Long Short String
// args parameter for command // line arguments is optional. fun main( ) { print("Hello, World.") } // args parameter included. fun main(args : Array<String>) { println("Hello, " + args[0] + ".") }
// a. int a = 3, b = 5; System.out.println(a + b); // Ans: Kotlin statements: var a = 3 var b = 5 println(a + b) // b. int a; double b; a = 3; b = 5.25; System.out.println(a + b); // Ans: Kotlin statements: var a : Int var b : Double a = 3 b = 5.25 println(a + b) // c. String a, b; a = "dog" b = "cat" System.out.println(a + b.toUpperCase( )); // Ans: Kotlin statements: var a : String var b : String a = "dog" b = "cat" println(a + b.toUpperCase( )); // d. Scanner s = new Scanner(System.in); String name = s.readLine( ); System.out.println("Hello, " + name); // Ans: Kotlin statements: // No Scanner object is necessary. var s = readLine( ) println("Hello, " + name) // e. public static void main(String[ ] args) { System.out.println(greeting("Larry")); } public String greeting(String theName) { return "Hello, " + theName; }
android:icon="@drawable/icon_name" android:label="@string/app_name"
<?xml version="1.0" encoding="utf-8"?> <vector xmlns:android= "http://schemas.android.com/apk/res/android" android:width="108dp" android:height="108dp" android:viewportWidth="108" android:viewportHeight="108"> <path android:fillColor="#008577" android:pathData="M0,0h108v108h-108z" /> <path android:fillColor="#00000000" android:pathData="M9,0L9,108" android:strokeWidth="0.8" android:strokeColor="#33FFFFFF" /> <path android:fillColor="#00000000" android:pathData="M19,0L19,108" android:strokeWidth="0.8" android:strokeColor="#33FFFFFF" /> <!-- 31 paths are omitted. --> <path android:fillColor="#00000000" android:pathData="M79,19L79,89" android:strokeWidth="0.8" android:strokeColor="#33FFFFFF" /> </vector>
android:theme="@style/AppTheme"
<resources> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> </style> </resources>The meanings of these color titles:
<?xml version="1.0" encoding="UTF-8"?> <resources> <color name="colorPrimary">#00BCD4</color> <color name="colorPrimaryDark">#660F09</color> <color name="colorAccent">#D81B60</color> </resources>These colors can be customized as desired.
Theme.AppCompat.Light.DarkActionBarare
Theme.AppCompat Theme.AppCompat.Light Theme.AppCompat.Light.NoActionBar Theme.AppCompat.NoActionBar