abc_alert_dialog_material.xml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Copyright (C) 2015 The Android Open Source Project
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. -->
  14. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  15. android:id="@+id/parentPanel"
  16. android:layout_width="match_parent"
  17. android:layout_height="wrap_content"
  18. android:orientation="vertical">
  19. <LinearLayout
  20. android:id="@+id/topPanel"
  21. android:layout_width="match_parent"
  22. android:layout_height="wrap_content"
  23. android:orientation="vertical">
  24. <LinearLayout
  25. android:id="@+id/title_template"
  26. android:layout_width="match_parent"
  27. android:layout_height="wrap_content"
  28. android:orientation="horizontal"
  29. android:gravity="center_vertical"
  30. android:paddingLeft="?attr/dialogPreferredPadding"
  31. android:paddingRight="?attr/dialogPreferredPadding"
  32. android:paddingTop="@dimen/abc_dialog_padding_top_material">
  33. <ImageView
  34. android:id="@android:id/icon"
  35. android:layout_width="32dip"
  36. android:layout_height="32dip"
  37. android:scaleType="fitCenter"
  38. android:src="@null"
  39. style="@style/RtlOverlay.Widget.AppCompat.DialogTitle.Icon"/>
  40. <android.support.v7.internal.widget.DialogTitle
  41. android:id="@+id/alertTitle"
  42. style="?attr/android:windowTitleStyle"
  43. android:singleLine="true"
  44. android:ellipsize="end"
  45. android:layout_width="match_parent"
  46. android:layout_height="wrap_content"
  47. android:textAlignment="viewStart" />
  48. </LinearLayout>
  49. <!-- If the client uses a customTitle, it will be added here. -->
  50. </LinearLayout>
  51. <FrameLayout
  52. android:id="@+id/contentPanel"
  53. android:layout_width="match_parent"
  54. android:layout_height="wrap_content"
  55. android:layout_weight="1"
  56. android:minHeight="48dp">
  57. <ScrollView
  58. android:id="@+id/scrollView"
  59. android:layout_width="match_parent"
  60. android:layout_height="wrap_content"
  61. android:clipToPadding="false">
  62. <LinearLayout
  63. android:layout_width="match_parent"
  64. android:layout_height="wrap_content"
  65. android:orientation="vertical">
  66. <TextView
  67. android:id="@android:id/message"
  68. style="@style/TextAppearance.AppCompat.Subhead"
  69. android:layout_width="match_parent"
  70. android:layout_height="wrap_content"
  71. android:paddingLeft="?attr/dialogPreferredPadding"
  72. android:paddingTop="@dimen/abc_dialog_padding_top_material"
  73. android:paddingRight="?attr/dialogPreferredPadding"/>
  74. <View
  75. android:id="@+id/textSpacerNoButtons"
  76. android:visibility="gone"
  77. android:layout_width="0dp"
  78. android:layout_height="@dimen/abc_dialog_padding_top_material"/>
  79. </LinearLayout>
  80. </ScrollView>
  81. </FrameLayout>
  82. <FrameLayout
  83. android:id="@+id/customPanel"
  84. android:layout_width="match_parent"
  85. android:layout_height="wrap_content"
  86. android:layout_weight="1"
  87. android:minHeight="48dp">
  88. <FrameLayout
  89. android:id="@+id/custom"
  90. android:layout_width="match_parent"
  91. android:layout_height="wrap_content"/>
  92. </FrameLayout>
  93. <LinearLayout
  94. android:id="@+id/buttonPanel"
  95. style="?attr/buttonBarStyle"
  96. android:layout_width="match_parent"
  97. android:layout_height="wrap_content"
  98. android:layoutDirection="locale"
  99. android:orientation="horizontal"
  100. android:paddingLeft="12dp"
  101. android:paddingRight="12dp"
  102. android:paddingTop="8dp"
  103. android:paddingBottom="8dp"
  104. android:gravity="bottom">
  105. <Button
  106. android:id="@android:id/button3"
  107. style="?attr/buttonBarNeutralButtonStyle"
  108. android:layout_width="wrap_content"
  109. android:layout_height="wrap_content"/>
  110. <android.support.v4.widget.Space
  111. android:layout_width="0dp"
  112. android:layout_height="0dp"
  113. android:layout_weight="1"
  114. android:visibility="invisible"/>
  115. <Button
  116. android:id="@android:id/button2"
  117. style="?attr/buttonBarNegativeButtonStyle"
  118. android:layout_width="wrap_content"
  119. android:layout_height="wrap_content"/>
  120. <Button
  121. android:id="@android:id/button1"
  122. style="?attr/buttonBarPositiveButtonStyle"
  123. android:layout_width="wrap_content"
  124. android:layout_height="wrap_content"/>
  125. </LinearLayout>
  126. </LinearLayout>