| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:fitsSystemWindows="true">
- <com.google.android.material.appbar.AppBarLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:id="@+id/abl_main"
- android:background="@color/white">
- <!--android:theme="@style/AppTheme.AppBarOverlay"-->
- <!--android:minHeight="?actionBarSize"水波纹居中和gravity属性有关-->
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="64dp"
- android:paddingStart="@dimen/margin_default"
- android:paddingEnd="0dp"
- android:orientation="horizontal"
- app:layout_scrollFlags="scroll|enterAlways|snap"
- android:paddingTop="@dimen/margin_default"
- android:gravity="center_vertical">
- <ImageView
- android:layout_width="@dimen/size_icon_big"
- android:layout_height="@dimen/size_icon_big"
- android:layout_gravity="center_vertical"
- android:scaleType="fitXY"
- android:src="@mipmap/logo_gray"
- android:tint="@color/black_theme"
- android:visibility="gone"/>
- <TextView
- android:id="@+id/title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="羊毛党 · 精选"
- android:textStyle="bold"
- android:textColor="@color/black_theme"
- android:textSize="@dimen/size_hello" />
- <Space
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"/>
- <!--上方搜索-->
- <FrameLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content">
- <RelativeLayout
- android:id="@+id/rl_search_top"
- android:layout_width="@dimen/height_edit_text"
- android:layout_height="@dimen/height_sliding_tab"
- android:background="?attr/selectableItemBackgroundBorderless">
- <!--无边界波纹-->
- <ImageView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerInParent="true"
- android:src="@drawable/ic_search"
- android:tint="@color/black_theme" />
- </RelativeLayout>
- <!--由于作为ViewOverlay的View不再触发点击事件,就用一个影子View来代替-->
- <RelativeLayout
- android:id="@+id/rl_search_top_shadow"
- android:layout_width="@dimen/height_edit_text"
- android:layout_height="@dimen/height_sliding_tab">
- <!--无边界波纹-->
- <FrameLayout
- android:id="@+id/fl_search_top"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerInParent="true"
- android:padding="@dimen/margin_ss"
- android:background="?attr/selectableItemBackgroundBorderless">
- <ImageView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/ic_search"
- android:tint="@color/black_theme"/>
- </FrameLayout>
- </RelativeLayout>
- </FrameLayout>
- <!--更多-->
- <RelativeLayout
- android:layout_width="@dimen/height_edit_text"
- android:layout_height="@dimen/height_sliding_tab">
- <FrameLayout
- android:id="@+id/fl_more"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerInParent="true"
- android:padding="@dimen/margin_ss"
- android:background="?attr/selectableItemBackgroundBorderless">
- <ImageView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/ic_more_vert"
- android:tint="@color/black_theme"/>
- </FrameLayout>
- </RelativeLayout>
- </LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:gravity="center_vertical"
- android:background="@color/white">
- <com.flyco.tablayout.SlidingTabLayout
- android:id="@+id/stl_home"
- android:layout_width="0dp"
- android:layout_weight="1"
- android:layout_height="@dimen/height_sliding_tab"
- android:layout_gravity="center_horizontal"
- app:tl_iconVisible="false"
- app:tl_indicator_bounce_enable="false"
- app:tl_indicator_color="@color/black_theme"
- app:tl_indicator_height="2.5dp"
- app:tl_indicator_width="10dp"
- app:tl_tab_width="44dp"
- app:tl_textBold="NONE"
- app:tl_textSelectColor="@color/black"
- app:tl_textUnselectColor="@color/colorTextSecondary"
- app:tl_textsize="@dimen/size_title_s"
- app:tl_indicator_margin_bottom="@dimen/margin_s"
- android:layout_marginStart="@dimen/margin_s"
- android:layout_marginEnd="@dimen/margin_default"/>
- <!--搜索-->
- <RelativeLayout
- android:id="@+id/rl_search"
- android:layout_width="@dimen/height_edit_text"
- android:layout_height="@dimen/height_sliding_tab"
- android:visibility="invisible">
- <FrameLayout
- android:id="@+id/fl_search"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerInParent="true"
- android:padding="@dimen/margin_ss"
- android:background="?attr/selectableItemBackgroundBorderless">
- <ImageView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/ic_search"
- android:tint="@color/black_theme"/>
- </FrameLayout>
- <!--无边界波纹-->
- </RelativeLayout>
- </LinearLayout>
- </com.google.android.material.appbar.AppBarLayout>
- <androidx.viewpager.widget.ViewPager
- android:id="@+id/vp_main"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- app:layout_behavior="@string/appbar_scrolling_view_behavior" />
- </androidx.coordinatorlayout.widget.CoordinatorLayout>
|