time_header_label.xml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. ~ Copyright (C) 2013 The Android Open Source Project
  4. ~
  5. ~ Licensed under the Apache License, Version 2.0 (the "License");
  6. ~ you may not use this file except in compliance with the License.
  7. ~ You may obtain a copy of the License at
  8. ~
  9. ~ http://www.apache.org/licenses/LICENSE-2.0
  10. ~
  11. ~ Unless required by applicable law or agreed to in writing, software
  12. ~ distributed under the License is distributed on an "AS IS" BASIS,
  13. ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. ~ See the License for the specific language governing permissions and
  15. ~ limitations under the License
  16. -->
  17. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  18. android:id="@+id/time_display"
  19. android:layout_width="match_parent"
  20. android:layout_height="match_parent"
  21. android:layout_gravity="center"
  22. android:background="@android:color/white" >
  23. <View
  24. android:id="@+id/center_view"
  25. android:layout_width="1dp"
  26. android:layout_height="1dp"
  27. android:background="#00000000"
  28. android:layout_centerInParent="true"
  29. android:visibility="invisible"
  30. android:importantForAccessibility="no" />
  31. <TextView
  32. android:id="@+id/hour_space"
  33. android:layout_width="wrap_content"
  34. android:layout_height="wrap_content"
  35. android:text="@string/time_placeholder"
  36. android:layout_toLeftOf="@+id/separator"
  37. android:layout_centerVertical="true"
  38. android:visibility="invisible"
  39. style="@style/time_label"
  40. android:importantForAccessibility="no" />
  41. <FrameLayout
  42. android:layout_width="0dp"
  43. android:layout_height="match_parent"
  44. android:layout_alignRight="@+id/hour_space"
  45. android:layout_alignLeft="@+id/hour_space"
  46. android:layout_marginLeft="@dimen/extra_time_label_margin"
  47. android:layout_marginRight="@dimen/extra_time_label_margin"
  48. android:layout_centerVertical="true" >
  49. <com.android.datetimepicker.AccessibleTextView
  50. android:id="@+id/hours"
  51. android:layout_width="wrap_content"
  52. android:layout_height="wrap_content"
  53. android:text="@string/time_placeholder"
  54. android:textColor="@color/blue"
  55. android:gravity="center_horizontal"
  56. android:layout_gravity="center"
  57. style="@style/time_label" />
  58. </FrameLayout>
  59. <TextView
  60. android:id="@+id/separator"
  61. android:layout_width="wrap_content"
  62. android:layout_height="wrap_content"
  63. android:text="@string/time_separator"
  64. android:paddingLeft="@dimen/separator_padding"
  65. android:paddingRight="@dimen/separator_padding"
  66. android:layout_alignRight="@+id/center_view"
  67. android:layout_centerVertical="true"
  68. style="@style/time_label"
  69. android:importantForAccessibility="no" />
  70. <TextView
  71. android:id="@+id/minutes_space"
  72. android:layout_width="wrap_content"
  73. android:layout_height="wrap_content"
  74. android:text="@string/time_placeholder"
  75. android:layout_toRightOf="@+id/separator"
  76. android:layout_centerVertical="true"
  77. android:visibility="invisible"
  78. style="@style/time_label"
  79. android:importantForAccessibility="no" />
  80. <FrameLayout
  81. android:layout_width="0dp"
  82. android:layout_height="match_parent"
  83. android:layout_alignRight="@+id/minutes_space"
  84. android:layout_alignLeft="@+id/minutes_space"
  85. android:layout_marginLeft="@dimen/extra_time_label_margin"
  86. android:layout_marginRight="@dimen/extra_time_label_margin"
  87. android:layout_centerVertical="true" >
  88. <com.android.datetimepicker.AccessibleTextView
  89. android:id="@+id/minutes"
  90. style="@style/time_label"
  91. android:layout_width="wrap_content"
  92. android:layout_height="wrap_content"
  93. android:gravity="center_horizontal"
  94. android:text="@string/time_placeholder"
  95. android:layout_gravity="center" />
  96. </FrameLayout>
  97. <com.android.datetimepicker.AccessibleTextView
  98. android:id="@+id/ampm_hitspace"
  99. android:layout_width="@dimen/ampm_label_size"
  100. android:layout_height="wrap_content"
  101. android:layout_alignParentTop="true"
  102. android:layout_alignParentBottom="true"
  103. android:layout_alignLeft="@+id/ampm_label"
  104. android:layout_alignRight="@+id/ampm_label" />
  105. <TextView
  106. android:id="@+id/ampm_label"
  107. android:layout_width="wrap_content"
  108. android:layout_height="wrap_content"
  109. android:text="@string/time_placeholder"
  110. android:paddingLeft="@dimen/ampm_left_padding"
  111. android:paddingRight="@dimen/ampm_left_padding"
  112. android:layout_toRightOf="@+id/minutes_space"
  113. android:layout_alignBaseline="@+id/separator"
  114. style="@style/ampm_label"
  115. android:importantForAccessibility="no" />
  116. </RelativeLayout>