Advertisement
Guest User

elements

a guest
Feb 6th, 2016
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.45 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:tools="http://schemas.android.com/tools"
  4. android:layout_width="match_parent"
  5. android:layout_height="match_parent"
  6. android:paddingBottom="@dimen/activity_vertical_margin"
  7. android:paddingLeft="@dimen/activity_horizontal_margin"
  8. android:paddingRight="@dimen/activity_horizontal_margin"
  9. android:paddingTop="@dimen/activity_vertical_margin"
  10. tools:context="com.code3e.elements.MainActivity">
  11.  
  12. <Button
  13. android:layout_width="wrap_content"
  14. android:layout_height="wrap_content"
  15. android:text="Press me"
  16. android:id="@+id/button"
  17. android:layout_alignParentTop="true" />
  18.  
  19. <TextView
  20. android:layout_width="wrap_content"
  21. android:layout_height="wrap_content"
  22. android:text="push the button"
  23. android:id="@+id/textView"
  24. android:gravity="right"
  25. android:layout_alignBottom="@+id/button"
  26. android:layout_alignParentRight="true"
  27. android:layout_alignParentEnd="true"
  28. android:textSize="20dp" />
  29.  
  30. <EditText
  31. android:layout_width="wrap_content"
  32. android:layout_height="wrap_content"
  33. android:id="@+id/editText"
  34. android:hint="Type your name..."
  35. android:layout_marginTop="32dp"
  36. android:layout_below="@+id/button"
  37. android:layout_alignParentLeft="true"
  38. android:layout_alignParentStart="true" />
  39.  
  40. <TextView
  41. android:layout_width="wrap_content"
  42. android:layout_height="wrap_content"
  43. android:text="type your name"
  44. android:id="@+id/textView2"
  45. android:gravity="right"
  46. android:textSize="20dp"
  47. android:layout_alignTop="@+id/editText"
  48. android:layout_alignRight="@+id/progressBar"
  49. android:layout_alignEnd="@+id/progressBar" />
  50.  
  51. <Switch
  52. android:layout_width="wrap_content"
  53. android:layout_height="wrap_content"
  54. android:id="@+id/switch1"
  55. android:layout_alignTop="@+id/progressBar"
  56. android:layout_alignParentLeft="true"
  57. android:layout_alignParentStart="true" />
  58.  
  59. <ProgressBar
  60. style="?android:attr/progressBarStyleLarge"
  61. android:layout_width="40dp"
  62. android:layout_height="40dp"
  63. android:id="@+id/progressBar"
  64. android:layout_below="@+id/editText"
  65. android:layout_alignRight="@+id/textView"
  66. android:layout_alignEnd="@+id/textView"
  67. android:layout_marginTop="35dp" />
  68.  
  69. <SeekBar
  70. android:layout_width="wrap_content"
  71. android:layout_height="wrap_content"
  72. android:id="@+id/seekBar"
  73. android:layout_below="@+id/switch1"
  74. android:layout_alignParentLeft="true"
  75. android:layout_alignParentStart="true"
  76. android:layout_marginTop="38dp"
  77. android:progress="50"
  78. android:layout_alignRight="@+id/textView"
  79. android:layout_alignEnd="@+id/textView" />
  80.  
  81. <RatingBar
  82. android:layout_width="wrap_content"
  83. android:layout_height="wrap_content"
  84. android:id="@+id/ratingBar"
  85. android:progress="50"
  86. android:progressBackgroundTint="#ff0000"
  87. android:layout_below="@+id/seekBar"
  88. android:layout_alignParentLeft="true"
  89. android:layout_alignParentStart="true"
  90. android:layout_marginTop="33dp" />
  91.  
  92. <ToggleButton
  93. android:layout_width="wrap_content"
  94. android:layout_height="wrap_content"
  95. android:text="New ToggleButton"
  96. android:id="@+id/toggleButton"
  97. android:layout_alignTop="@+id/ratingBar"
  98. android:layout_alignRight="@+id/textView2"
  99. android:layout_alignEnd="@+id/textView2" />
  100.  
  101. <RadioButton
  102. android:layout_width="wrap_content"
  103. android:layout_height="wrap_content"
  104. android:text="Radiobutton"
  105. android:id="@+id/radioButton"
  106. android:layout_below="@+id/ratingBar"
  107. android:layout_marginTop="20dp"
  108. android:layout_alignParentLeft="true"
  109. android:layout_alignParentStart="true" />
  110.  
  111. <CheckBox
  112. android:layout_width="wrap_content"
  113. android:layout_height="wrap_content"
  114. android:text="CheckBox"
  115. android:id="@+id/checkBox"
  116. android:layout_alignTop="@+id/radioButton"
  117. android:layout_alignRight="@+id/toggleButton"
  118. android:layout_alignEnd="@+id/toggleButton" />
  119.  
  120. </RelativeLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement