Advertisement
Guest User

Untitled

a guest
Jul 25th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <resources>
  3.  
  4. <style name="TestApp">
  5. </style>
  6.  
  7. <!-- Text Appearances -->
  8. <style name="TestApp.TextAppearance">
  9. <item name="android:typeface">sans</item>
  10. <item name="android:textStyle">bold</item>
  11. <item name="android:textSize">16px</item>
  12. <item name="android:textColor">#6666FF</item>
  13. </style>
  14.  
  15. <!-- Widget Styles -->
  16. <style name="TestApp.Widget">
  17. <item name="android:layout_margin">3sp</item>
  18. </style>
  19.  
  20. <style name="TestApp.Widget.Label">
  21. <item name="android:textAppearance">@style/TestApp.TextAppearance</item>
  22. <item name="android:layout_width">wrap_content</item>
  23. <item name="android:layout_height">wrap_content</item>
  24. </style>
  25.  
  26. <style name="TestApp.Widget.Switch">
  27. <item name="android:textAppearance">@style/TestApp.TextAppearance</item>
  28. <item name="android:layout_width">100px</item>
  29. <item name="android:layout_height">100px</item>
  30. </style>
  31.  
  32. </resources>
  33.  
  34. <?xml version="1.0" encoding="utf-8"?>
  35. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  36. android:orientation="vertical"
  37. android:layout_width="fill_parent"
  38. android:layout_height="fill_parent" >
  39. <TextView
  40. style="@style/TestApp.Widget.Label"
  41. android:text="This is my label." />
  42. <TextView
  43. style="@style/TestApp.Widget.Label"
  44. android:text="This is my disabled label."
  45. android:enabled="false" />
  46. <Button
  47. style="@style/TestApp.Widget.Switch"
  48. android:text="This is my switch." />
  49. <Button
  50. style="@style/TestApp.Widget.Switch"
  51. android:text="This is my disabled switch."
  52. android:enabled="false" />
  53. </LinearLayout>
  54.  
  55. <style name="Application.Button">
  56. <item name="android:textAppearance">@style/Application.Text.Medium.White</item>
  57. <item name="android:textColor">@null</item>
  58. </style>
  59.  
  60. <Button
  61. android:layout_width="wrap_content"
  62. android:layout_height="wrap_content"
  63. style="@style/Application.Button" />
  64.  
  65. <Button
  66. android:layout_width="wrap_content"
  67. android:layout_height="wrap_content"
  68. style="@style/Application.Button"
  69. android:textColor="@null" />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement