dialog_download.xml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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="wrap_content"
  6. android:background="@android:color/white">
  7. <TextView
  8. android:id="@+id/tv_progress_title"
  9. android:layout_width="wrap_content"
  10. android:layout_height="wrap_content"
  11. android:layout_centerHorizontal="true"
  12. android:padding="20dp"
  13. android:textColor="@android:color/black"
  14. android:textSize="30sp"
  15. tools:text="标题" />
  16. <View
  17. android:id="@+id/centerLine"
  18. android:layout_width="1dp"
  19. android:layout_height="1dp"
  20. android:layout_centerInParent="true" />
  21. <ProgressBar
  22. android:id="@+id/progress"
  23. style="?android:progressBarStyleHorizontal"
  24. android:layout_width="match_parent"
  25. android:layout_height="20dp"
  26. android:layout_below="@+id/tv_progress_title"
  27. android:layout_margin="20dp"
  28. android:max="100"
  29. android:progress="0"
  30. android:progressDrawable="@android:drawable/progress_horizontal" />
  31. <Button
  32. android:id="@+id/btn_cancel"
  33. android:layout_width="match_parent"
  34. android:layout_height="wrap_content"
  35. android:layout_below="@+id/progress"
  36. android:layout_toLeftOf="@+id/centerLine"
  37. android:layout_toStartOf="@+id/centerLine"
  38. android:text="取消"
  39. android:textColor="@android:color/white"
  40. android:textSize="28sp"
  41. android:visibility="gone"/>
  42. <Button
  43. android:id="@+id/btn_submit"
  44. android:layout_width="match_parent"
  45. android:layout_height="wrap_content"
  46. android:layout_below="@+id/progress"
  47. android:layout_toEndOf="@+id/centerLine"
  48. android:layout_toRightOf="@+id/centerLine"
  49. android:text="安装"
  50. android:textColor="@android:color/holo_red_light"
  51. android:textSize="28sp"
  52. android:visibility="gone"/>
  53. </RelativeLayout>