【发布时间】:2015-01-02 14:12:37
【问题描述】:
我想将操作栏/工具栏显示和隐藏为 Google Play 商店应用。我在顶部使用滑动选项卡并查看寻呼机来显示每个选项卡的内容。以下是 Google Play 商店应用的截图供参考:
我的布局 XML:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent">
<LinearLayout style="@style/HeaderBar"
android:id="@+id/headerbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include layout="@layout/toolbar_no_bg"
android:id="@+id/toolbar_actionbar"/>
<com.fauzie.sample.tabsspinner.widget.SlidingTabLayout
android:background="@color/tab_background"
android:id="@+id/sliding_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<android.support.v4.view.ViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/headerbar">
</android.support.v4.view.ViewPager>
</RelativeLayout>
提前致谢。
【问题讨论】:
-
看到这个answer