这是我向上滑动顶部栏时的屏幕截图:
Yes it is possible to create using appbar layout,I have trIEd same task,Finally i have figured-out in this way,I guess below code is helpful for you
<?xml version="1.0" enCoding="utf-8"?> <layout xmlns:androID="http://schemas.androID.com/apk/res/androID" xmlns:app="http://schemas.androID.com/apk/res-auto"> <linearLayout androID:layout_wIDth="match_parent" androID:layout_height="match_parent" androID:orIEntation="vertical"> <!--your toolbar--> <include androID:ID="@+ID/toolbar_wrapper" layout="@layout/common_toolbar" androID:layout_wIDth="match_parent" androID:layout_height="wrap_content" /> <androID.support.design.Widget.CoordinatorLayout androID:layout_wIDth="match_parent" androID:layout_height="match_parent"> <androID.support.design.Widget.AppbarLayout androID:ID="@+ID/appbar" androID:layout_wIDth="match_parent" androID:layout_height="wrap_content" androID:background="@color/color_fafafa" androID:orIEntation="vertical"> <linearLayout androID:layout_wIDth="match_parent" androID:layout_height="match_parent" androID:background="@color/color_ffffff" androID:orIEntation="vertical" app:layout_scrollFlags="scroll"> <!--your scrolling layout,in your case it will be edit texts and search fIElds--> </linearLayout> </androID.support.design.Widget.AppbarLayout> <linearLayout androID:layout_wIDth="match_parent" androID:layout_height="match_parent" androID:orIEntation="vertical" app:layout_behavior="@string/appbar_scrolling_vIEw_behavior"> <androID.support.design.Widget.TabLayout androID:ID="@+ID/tab_layout" androID:layout_wIDth="match_parent" androID:layout_height="@dimen/dp_49" androID:background="@color/color_ffffff" androID:theme="@style/themeOverlay.AppCompat.Dark.Actionbar" app:tabIndicatorcolor="@color/colorAccent" app:tabSelectedTextcolor="@color/color_727272" app:tabTextcolor="@color/color_b6b6b6" /> <VIEw androID:layout_wIDth="match_parent" androID:layout_height="@dimen/dp_1" androID:background="@color/color_d9d9d9" /> <!--your main layout--> <androID.support.v4.vIEw.VIEwPager androID:ID="@+ID/detail_pager" androID:layout_wIDth="match_parent" androID:layout_height="match_parent" androID:nestedScrollingEnabled="true" /> </linearLayout> </androID.support.design.Widget.CoordinatorLayout> </linearLayout></layout>总结
以上是内存溢出为你收集整理的android – Airbnb探索屏幕等工具栏中的自定义视图全部内容,希望文章能够帮你解决android – Airbnb探索屏幕等工具栏中的自定义视图所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)