前提・実現したいこと
Xamarin.Androidを勉強しています。
DrawerLayoutに配置したNavigationViewを引き出そうとすると、
引っかかってしまい上手く引き出せません。
何か、勘所や暫定対処などありますでしょうか?
以上、よろしくお願いいたします。
参考動画・事象
- 画面2で引っかかりが多発。
- 画面1でもたまに発生。
- 引っかかった後、少しスワイプを戻すと引けるようになる。
- ゆっくり引き出すと引ける。(引っかかるx座標より手前の座標が先に認識されると引けるように思える)
該当のソースコード
該当の画面は、Fragmentを差し替えて表示しています。
構造は、凝ったことはしていないつもりですが。。
画面1
xml
1<?xml version="1.0" encoding="utf-8"?> 2<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:orientation="vertical" 4 android:layout_width="match_parent" 5 android:layout_height="match_parent"> 6 <TextView 7 android:text="Text" 8 android:layout_width="match_parent" 9 android:layout_height="wrap_content" 10 android:id="@+id/textView1" /> 11</LinearLayout>
画面2(viewpager)
xml
1<?xml version="1.0" encoding="utf-8"?> 2<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:orientation="vertical" 4 android:layout_width="match_parent" 5 android:layout_height="match_parent"> 6 <TextView 7 android:text="Text" 8 android:layout_width="match_parent" 9 android:layout_height="wrap_content" 10 android:id="@+id/textView1" /> 11 <TextView 12 android:text="Text" 13 android:layout_width="match_parent" 14 android:layout_height="wrap_content" 15 android:id="@+id/textView2" /> 16 <TextView 17 android:text="Text" 18 android:layout_width="match_parent" 19 android:layout_height="wrap_content" 20 android:id="@+id/textView4" /> 21 <android.support.v4.view.ViewPager 22 android:minWidth="25px" 23 android:minHeight="25px" 24 android:layout_width="match_parent" 25 android:layout_height="match_parent" 26 android:id="@+id/viewpager"> 27 <android.support.v4.view.PagerTabStrip 28 android:minWidth="25px" 29 android:minHeight="25px" 30 android:layout_width="match_parent" 31 android:layout_height="wrap_content" 32 android:id="@+id/pagertabstrip" /> 33 </android.support.v4.view.ViewPager> 34</LinearLayout>
fragmentのコンテナ(id:content_frame)
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.design.widget.AppBarLayout android:id="@+id/toolbar_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/AppTheme.AppBarOverlay"> <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:minHeight="?attr/actionBarSize" android:background="?attr/colorPrimary" app:popupTheme="@style/AppTheme.PopupOverlay" /> </android.support.design.widget.AppBarLayout> <FrameLayout android:id="@+id/content_frame" android:layout_width="match_parent" android:layout_height="match_parent" /> </RelativeLayout>
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/06/02 07:56