custom_alert.xml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. android:layout_width="match_parent"
  4. android:layout_height="match_parent"
  5. android:background="@drawable/department_layer">
  6. <LinearLayout
  7. android:layout_width="450dp"
  8. android:layout_height="220dp"
  9. android:layout_centerInParent="true"
  10. android:background="@drawable/department_layer"
  11. android:orientation="vertical">
  12. <RelativeLayout
  13. android:layout_width="match_parent"
  14. android:layout_height="56dp"
  15. android:layout_margin="2dp"
  16. android:background="@color/commonColor">
  17. <TextView
  18. android:id="@+id/tvTitle"
  19. android:layout_width="wrap_content"
  20. android:layout_height="match_parent"
  21. android:layout_marginLeft="16dp"
  22. android:layout_marginRight="8dp"
  23. android:gravity="center"
  24. android:background="@color/commonColor"
  25. android:text="@string/alrim"
  26. android:textColor="@color/white"
  27. android:textSize="20sp"
  28. android:textStyle="bold" />
  29. <!--<Button-->
  30. <!--android:id="@+id/btnClose"-->
  31. <!--android:layout_width="35dp"-->
  32. <!--android:layout_height="35dp"-->
  33. <!--android:layout_alignParentRight="true"-->
  34. <!--android:layout_centerVertical="true"-->
  35. <!--android:layout_gravity="center"-->
  36. <!--android:layout_marginRight="16dp"-->
  37. <!--android:background="@drawable/ic_clear_black_24dp" />-->
  38. </RelativeLayout>
  39. <LinearLayout
  40. android:layout_width="match_parent"
  41. android:layout_height="match_parent"
  42. android:orientation="vertical"
  43. android:layout_marginBottom="4dp"
  44. android:layout_marginLeft="4dp"
  45. android:layout_marginRight="4dp"
  46. android:weightSum="2">
  47. <LinearLayout
  48. android:layout_width="match_parent"
  49. android:layout_height="match_parent"
  50. android:layout_weight="0.8">
  51. <TextView
  52. android:id="@+id/tvAlertMsg"
  53. android:layout_width="match_parent"
  54. android:layout_height="match_parent"
  55. android:background="@color/white"
  56. android:gravity="center"
  57. android:text="asdfasdfa"
  58. android:textColor="@color/black"
  59. android:textSize="20dp" />
  60. </LinearLayout>
  61. <RelativeLayout
  62. android:layout_width="match_parent"
  63. android:layout_height="match_parent"
  64. android:background="@xml/border_top"
  65. android:layout_weight="1.1">
  66. <Button
  67. android:id="@+id/btnConfirm2"
  68. style="?android:attr/borderlessButtonStyle"
  69. android:layout_width="110dp"
  70. android:layout_height="match_parent"
  71. android:layout_marginTop="16dp"
  72. android:layout_marginBottom="16dp"
  73. android:layout_centerInParent="true"
  74. android:background="@drawable/shape2"
  75. android:textColor="@color/white"
  76. android:text="@string/confirm"
  77. android:textSize="16sp"
  78. android:visibility="gone"/>
  79. <LinearLayout
  80. android:id="@+id/btnLayout"
  81. android:layout_width="match_parent"
  82. android:layout_height="match_parent"
  83. android:orientation="horizontal"
  84. android:visibility="visible">
  85. <Button
  86. android:id="@+id/btnConfirm"
  87. style="?android:attr/borderlessButtonStyle"
  88. android:layout_width="match_parent"
  89. android:layout_height="match_parent"
  90. android:layout_marginLeft="48dp"
  91. android:layout_marginTop="16dp"
  92. android:layout_marginRight="10dp"
  93. android:layout_marginBottom="16dp"
  94. android:layout_weight="1"
  95. android:background="@drawable/shape2"
  96. android:textColor="@color/white"
  97. android:textSize="16sp"
  98. android:text="@string/confirm"/>
  99. <Button
  100. android:id="@+id/btnCancel"
  101. style="?android:attr/borderlessButtonStyle"
  102. android:layout_width="match_parent"
  103. android:layout_height="match_parent"
  104. android:layout_marginLeft="10dp"
  105. android:layout_marginTop="16dp"
  106. android:layout_marginRight="48dp"
  107. android:layout_marginBottom="16dp"
  108. android:layout_weight="1"
  109. android:text="@string/cancel"
  110. android:textColor="@color/white"
  111. android:textSize="16sp"
  112. android:background="@drawable/shape2" />
  113. </LinearLayout>
  114. </RelativeLayout>
  115. </LinearLayout>
  116. </LinearLayout>
  117. </RelativeLayout>