activity_main.xml 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <layout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. xmlns:tools="http://schemas.android.com/tools">
  5. <RelativeLayout
  6. android:layout_width="match_parent"
  7. android:layout_height="match_parent"
  8. android:background="@drawable/bg_main"
  9. android:fitsSystemWindows="true"
  10. android:orientation="vertical">
  11. <FrameLayout
  12. android:id="@+id/header_layout"
  13. android:layout_width="match_parent"
  14. android:layout_height="@dimen/header_height"
  15. android:layout_margin="@dimen/iscs_space_2"
  16. android:paddingHorizontal="@dimen/iscs_space_1">
  17. <LinearLayout
  18. android:layout_width="match_parent"
  19. android:layout_height="match_parent"
  20. android:orientation="horizontal">
  21. <FrameLayout
  22. android:layout_width="match_parent"
  23. android:layout_height="match_parent"
  24. android:layout_weight="1"
  25. android:background="@drawable/bg_home_header"
  26. android:orientation="horizontal">
  27. <ImageView
  28. android:layout_width="@dimen/header_logo_width"
  29. android:layout_height="@dimen/header_logo_height"
  30. android:layout_gravity="center_vertical"
  31. app:skinSrc='@{"icon_logo.png"}' />
  32. <TextClock
  33. android:layout_width="wrap_content"
  34. android:layout_height="match_parent"
  35. android:layout_gravity="right"
  36. android:format12Hour="yyyy-MM-dd HH:mm:ss"
  37. android:format24Hour="yyyy-MM-dd HH:mm:ss"
  38. android:gravity="center"
  39. android:paddingHorizontal="@dimen/iscs_space_1"
  40. android:textColor="?attr/colorTextPrimary"
  41. android:textSize="@dimen/iscs_text_md" />
  42. </FrameLayout>
  43. <LinearLayout
  44. android:id="@+id/user_info_layout"
  45. android:layout_width="wrap_content"
  46. android:layout_height="match_parent"
  47. android:layout_marginLeft="@dimen/iscs_space_2"
  48. android:background="@drawable/bg_card_blue_radius_md"
  49. android:orientation="horizontal"
  50. android:paddingHorizontal="@dimen/iscs_space_2">
  51. <ImageView
  52. android:id="@+id/avatar"
  53. android:layout_width="@dimen/avatar_size"
  54. android:layout_height="@dimen/avatar_size"
  55. android:layout_gravity="center_vertical"
  56. android:padding="@dimen/iscs_space_1"
  57. android:src="@mipmap/icon_avatar"
  58. android:tint="?attr/colorWhite" />
  59. <TextView
  60. android:id="@+id/nickname"
  61. android:layout_width="wrap_content"
  62. android:layout_height="match_parent"
  63. android:layout_marginLeft="@dimen/iscs_space_2"
  64. android:ellipsize="end"
  65. android:gravity="center"
  66. android:maxLength="13"
  67. android:singleLine="true"
  68. android:textColor="?attr/colorTextPrimary"
  69. android:textSize="@dimen/iscs_text_md"
  70. tools:text="张三" />
  71. </LinearLayout>
  72. </LinearLayout>
  73. </FrameLayout>
  74. <androidx.fragment.app.FragmentContainerView
  75. android:id="@+id/nav_host_fragment"
  76. android:name="androidx.navigation.fragment.NavHostFragment"
  77. android:layout_width="match_parent"
  78. android:layout_height="match_parent"
  79. android:layout_above="@+id/bottom_layout"
  80. android:layout_below="@+id/header_layout"
  81. app:defaultNavHost="true"
  82. app:navGraph="@navigation/nav_home" />
  83. <FrameLayout
  84. android:id="@+id/bottom_layout"
  85. android:layout_width="match_parent"
  86. android:layout_height="wrap_content"
  87. android:layout_alignParentBottom="true">
  88. <TextView
  89. android:id="@+id/bottom_tip"
  90. android:layout_width="wrap_content"
  91. android:layout_height="wrap_content"
  92. android:layout_gravity="center_vertical"
  93. android:layout_marginLeft="@dimen/iscs_space_4"
  94. android:drawableLeft="@mipmap/tip"
  95. android:drawablePadding="@dimen/iscs_space_2"
  96. android:textColor="?attr/colorTextPrimary"
  97. android:textSize="@dimen/iscs_text_md"
  98. android:visibility="gone" />
  99. <com.grkj.ui_base.widget.CustomNavBar
  100. android:id="@+id/nav_bar"
  101. android:layout_width="match_parent"
  102. android:layout_height="@dimen/home_bottom_nav_size"
  103. app:navBarBackground="?attr/colorSecBg"
  104. app:navIconSelectedSize="@dimen/home_bottom_nav_icon_size"
  105. app:navIconSize="@dimen/home_bottom_nav_icon_size"
  106. app:navOrientation="horizontal"
  107. app:navTextSelectedSize="@dimen/iscs_text_sm"
  108. app:navTextSize="@dimen/iscs_text_sm" />
  109. </FrameLayout>
  110. </RelativeLayout>
  111. </layout>