【发布时间】:2015-04-27 11:50:49
【问题描述】:
我已将抽屉式导航添加到包含 PagerSlidingStrip 的活动中。当我从屏幕的左向右滑动时可以看到抽屉式导航,但在操作栏中看不到抽屉式导航图标。 以下是我的代码-
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout 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">
<FrameLayout
android:id="@+id/content_frame_main"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<com.astuetz.PagerSlidingTabStrip
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="48dip"
android:background="#8E58D4"
app:pstsIndicatorColor="#5B349E"
app:pstsDividerColor="#8E58D4"
app:pstsTabSwitch="true"
/>
<android.support.v4.view.ViewPager
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/tabs"
android:layout_alignParentBottom="true" />
</RelativeLayout>
<ListView android:id="@+id/left_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
android:background="#111"/>
</android.support.v4.widget.DrawerLayout>
【问题讨论】:
-
你看到我的回答了吗
-
@Lokesh 是的..+你的答案。
-
你找到解决方案了吗?
标签: android navigation-drawer pagerslidingtabstrip