QQ5.0側(cè)滑效果和微信左右滑動的混合使用
QQ5.0的側(cè)滑效果和微信的頁面切換為什么不能同時使用,好像有沖突。問題是出在布局文件嗎?還是其他原因?其他代碼和老師一樣。
其中activity_main.xml如下:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
? ? xmlns:chenyufeng="http://schemas.android.com/apk/res/com.imooc.baidumap"
? ? android:layout_width="match_parent"
? ? android:layout_height="match_parent"?
? ? android:orientation="horizontal">
? ? <com.imooc.view.SlidingMenu
? ? ? ? android:id="@+id/id_menu"
? ? ? ? android:layout_width="match_parent"
? ? ? ? android:layout_height="match_parent"
? ? ? ? android:background="@drawable/img_frame_background"
? ? ? ? android:scrollbars="none"
? ? ? ? chenyufeng:rightPadding="80dp" >
? ? ? ? <LinearLayout
? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? android:layout_height="match_parent"
? ? ? ? ? ? android:orientation="horizontal" >
? ? ? ? ? ? <include layout="@layout/left_menu" />
? ? ? ? ? ? <include layout="@layout/right_menu" />
? ? ? ? ? ??
? ? ? ? </LinearLayout>
? ? </com.imooc.view.SlidingMenu>
</LinearLayout>
right_menu.xml如下:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
? ? android:layout_width="match_parent"
? ? android:layout_height="match_parent"
? ? android:orientation="vertical"?
? ? android:background="@drawable/qq">
? ? <include layout="@layout/top1" />
? ? <include layout="@layout/top2" />
? ? <android.support.v4.view.ViewPager
? ? ? ? android:id="@+id/id_viewpager"
? ? ? ? android:layout_width="match_parent"
? ? ? ? android:layout_height="0dp"
? ? ? ? android:layout_weight="1" />
</LinearLayout>
2016-12-23
我也是這樣 解決了嗎
2016-12-14
朋友你解決了嗎,我跟你一個思路,左側(cè)菜單欄側(cè)滑可以但是主界面的三個fragment 只能顯示第一個,不能滑動。
2015-05-28
你有你那個老師的源碼么,我也碰到這個問題,我想看看