You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

fragment_test_a.xml 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <android.support.design.widget.CoordinatorLayout 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. android:layout_width="match_parent"
  6. android:layout_height="match_parent"
  7. tools:context=".ui.fragment.TestFragmentA">
  8. <android.support.design.widget.AppBarLayout
  9. android:id="@+id/abl_test_bar"
  10. android:layout_width="match_parent"
  11. android:layout_height="wrap_content"
  12. android:background="@color/white"
  13. android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
  14. app:elevation="0dp">
  15. <com.hjq.demo.widget.XCollapsingToolbarLayout
  16. android:id="@+id/ctl_test_bar"
  17. android:layout_width="match_parent"
  18. android:layout_height="@dimen/space_512"
  19. app:contentScrim="@color/white"
  20. app:layout_scrollFlags="scroll|exitUntilCollapsed"
  21. app:scrimVisibleHeightTrigger="@dimen/space_200">
  22. <ImageView
  23. android:layout_width="match_parent"
  24. android:layout_height="wrap_content"
  25. android:paddingTop="@dimen/space_300"
  26. android:scaleType="centerCrop"
  27. android:src="@drawable/bg_launcher"
  28. app:layout_collapseMode="parallax" />
  29. <android.support.v7.widget.Toolbar
  30. android:id="@+id/t_test_title"
  31. android:layout_width="match_parent"
  32. android:layout_height="?android:attr/actionBarSize"
  33. android:layout_marginRight="20dp"
  34. app:layout_collapseMode="pin" />
  35. <com.hjq.bar.TitleBar
  36. android:id="@+id/tb_test_a_bar"
  37. android:layout_width="match_parent"
  38. android:layout_height="?android:attr/actionBarSize"
  39. app:backButton="false"
  40. app:barStyle="transparent"
  41. app:layout_collapseMode="pin">
  42. <LinearLayout
  43. android:layout_width="match_parent"
  44. android:layout_height="match_parent"
  45. android:orientation="horizontal"
  46. android:padding="@dimen/space_20">
  47. <TextView
  48. android:id="@+id/tv_test_address"
  49. android:layout_width="wrap_content"
  50. android:layout_height="match_parent"
  51. android:layout_marginLeft="@dimen/space_20"
  52. android:gravity="center_vertical"
  53. android:text="地区"
  54. android:textColor="@color/white"
  55. android:textSize="@dimen/font_size_30px" />
  56. <TextView
  57. android:id="@+id/tv_test_search"
  58. android:layout_width="match_parent"
  59. android:layout_height="match_parent"
  60. android:layout_marginLeft="@dimen/space_40"
  61. android:layout_marginRight="@dimen/space_100"
  62. android:background="@drawable/bg_home_search_bar_transparent"
  63. android:gravity="center"
  64. android:text="请输入搜索关键字"
  65. android:textColor="#a4a4a4"
  66. android:textSize="@dimen/font_size_28px" />
  67. </LinearLayout>
  68. </com.hjq.bar.TitleBar>
  69. </com.hjq.demo.widget.XCollapsingToolbarLayout>
  70. </android.support.design.widget.AppBarLayout>
  71. <android.support.v4.widget.NestedScrollView
  72. android:layout_width="match_parent"
  73. android:layout_height="match_parent"
  74. app:layout_behavior="@string/appbar_scrolling_view_behavior">
  75. <LinearLayout
  76. android:layout_width="match_parent"
  77. android:layout_height="match_parent"
  78. android:layout_marginLeft="@dimen/space_60"
  79. android:layout_marginRight="@dimen/space_60"
  80. android:orientation="vertical">
  81. </LinearLayout>
  82. </android.support.v4.widget.NestedScrollView>
  83. </android.support.design.widget.CoordinatorLayout>