Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.73 KB | None | 0 0
  1. //TEXT VIEW SAMPLE
  2. <?xml version="1.0" encoding="utf-8"?>
  3. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  4.    android:orientation="vertical"
  5.    android:layout_width="match_parent"
  6.    android:layout_height="match_parent"
  7.    android:gravity="center">
  8.  
  9.  
  10.     <TextView
  11.        android:layout_width="wrap_content"
  12.        android:layout_height="wrap_content"
  13.        android:text="Big Red"
  14.        android:textSize="50sp"
  15.        android:textColor="#125e84"/>
  16.  
  17.     <TextView
  18.        android:layout_width="wrap_content"
  19.        android:layout_height="wrap_content"
  20.        android:text="@string/app_name"/>
  21. </LinearLayout>
  22.  
  23.  
  24. //BUTTON SAMPLE
  25. <?xml version="1.0" encoding="utf-8"?>
  26. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  27.    android:orientation="vertical" android:layout_width="match_parent"
  28.    android:layout_height="match_parent">
  29.  
  30.     <Button
  31.        android:layout_width="match_parent"
  32.        android:layout_height="wrap_content"
  33.        android:text="Button 1"
  34.        android:drawableLeft="@mipmap/ic_launcher"/>
  35.  
  36.     <Button
  37.        android:layout_width="match_parent"
  38.        android:layout_height="wrap_content"
  39.        android:text="Button 1"
  40.        android:drawableLeft="@drawable/rumah"/>
  41.  
  42. </LinearLayout>
  43.  
  44.  
  45. //EDIT_TEXT_SAMPLE
  46. <?xml version="1.0" encoding="utf-8"?>
  47. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  48.    android:orientation="vertical" android:layout_width="match_parent"
  49.    android:layout_height="match_parent">
  50.  
  51.     <EditText
  52.        android:layout_width="match_parent"
  53.        android:layout_height="wrap_content"
  54.        android:hint="@string/app_name"
  55.        android:inputType="number"/>
  56.  
  57. </LinearLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement