xml
1<?xml version="1.0" encoding="utf-8"?> 2<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 xmlns:tools="http://schemas.android.com/tools" 4 android:layout_width="match_parent" 5 android:layout_height="match_parent" 6 android:background="@color/white"> 7 8 <ScrollView 9 android:layout_width="match_parent" 10 android:layout_height="match_parent" 11 android:fillViewport="true"> 12 13 <LinearLayout 14 android:layout_width="match_parent" 15 android:layout_height="match_parent" 16 android:orientation="vertical"> 17 18 <LinearLayout 19 android:id="@+id/ll_share_module" 20 android:layout_width="match_parent" 21 android:layout_height="50dp" 22 android:background="@color/white" 23 android:orientation="horizontal" 24 android:weightSum="1"> 25 26 <TextView 27 android:layout_width="wrap_content" 28 android:layout_height="wrap_content" 29 android:layout_marginBottom="15dp" 30 android:layout_marginLeft="15dp" 31 android:layout_marginTop="16dp" 32 android:layout_weight="0.95" 33 android:text="aaaaaa" 34 android:textColor="#333333" 35 android:textSize="17dp" /> 36 37 <Button 38 android:id="@+id/ib_share_button" 39 android:layout_width="wrap_content" 40 android:layout_height="wrap_content" 41 android:layout_alignParentRight="true" 42 android:layout_marginBottom="15dp" 43 android:layout_marginRight="5dp" 44 android:layout_marginTop="16dp" 45 android:background="@drawable/ic_share_sales_promotion" /> 46 47 <TextView 48 android:layout_width="wrap_content" 49 android:layout_height="wrap_content" 50 android:layout_marginBottom="15dp" 51 android:layout_marginTop="16dp" 52 android:text="share" 53 android:textColor="#808080" 54 android:textSize="14dp" /> 55 56 </LinearLayout> 57 58 59 <android.support.v4.widget.SwipeRefreshLayout 60 android:id="@+id/srl_container" 61 android:layout_width="match_parent" 62 android:layout_height="match_parent"> 63 64 65 <FrameLayout 66 android:layout_width="match_parent" 67 android:layout_height="match_parent"> 68 69 70 <android.support.v7.widget.RecyclerView xmlns:tools="http://schemas.android.com/tools" 71 android:id="@+id/rv_sales" 72 android:layout_width="match_parent" 73 android:layout_height="wrap_content" 74 android:layout_gravity="center_horizontal|bottom" 75 tools:context=".TopFragment" /> 76 77 78 </FrameLayout> 79 </android.support.v4.widget.SwipeRefreshLayout> 80 81 </LinearLayout> 82 </ScrollView> 83 84 <include layout="@layout/list_counter"></include> 85 86 87</RelativeLayout>
上記のようなScrollViewを設定すると、RecyclerViewの部分しかスクロールしません。
<LinearLayout android:id="@+id/ll_share_module"
この部分も一緒にスクロールしてほしいのですが、それは可能でしょうか。
ご存知の方いらっしゃいましたらご教示ください。
■追記
おそらくScrollViewとRecyclerViewのスクロールがあってRecyclerViewのスクロールが優先されてしまっているとは思うのですが・・・
■追記2016.01.08
RecyclerView内部に
<LinearLayout android:id="@+id/ll_share_module"
を持たせることで一旦解決させましたが、根本的な解決になっていないため回答者を募集しております。
あなたの回答
tips
プレビュー