android - How can I make my RecyclerView behind a FloatingActionsMenu fully scrollable? -
i have written app shows bus routes @ university. app working fine there problem layout: not of recyclerview scrollable, can see in this picture. green square scrollable, red 1 not scroll, if floatingactionsmenu no expanded.
the floatingactionsmenu made this library.
the xml-code recyclerview , floatingactionsmenu is:
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingtop="@dimen/activity_vertical_margin" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:background="@drawable/aachen_background"> .... <android.support.v7.widget.recyclerview android:duplicateparentstate="true" android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/multi_cards" android:layout_below="@id/maincard" /> <com.getbase.floatingactionbutton.floatingactionsmenu android:id="@+id/action_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:clickable="true" fab:fab_addbuttoncolornormal="@color/fab_color" app:fab_addbuttoncolorpressed="@color/fab_color" fab:fab_addbuttonplusiconcolor="@color/black_semi_transparent" fab:fab_addbuttonsize="normal" fab:fab_labelsposition="left" fab:fab_labelstyle="@style/menu_labels_style" app:fab_addbuttonstrokevisible="false" android:layout_alignparentbottom="true" android:layout_alignparentend="true" android:layout_below="@+id/maincard"> <com.getbase.floatingactionbutton.floatingactionbutton android:id="@+id/find_activity" android:layout_width="wrap_content" android:layout_height="wrap_content" fab:fab_colornormal="@color/fab_color" fab:fab_colorpressed="@color/fab_color" fab:fab_title="@string/find_activity" fab:fab_icon="@mipmap/find_activity" fab:fab_size="mini" /> <com.getbase.floatingactionbutton.floatingactionbutton android:id="@+id/appointment_finder" android:layout_width="wrap_content" android:layout_height="wrap_content" fab:fab_colornormal="@color/fab_color" fab:fab_colorpressed="@color/fab_color" fab:fab_title="@string/appointment_finder" fab:fab_icon="@mipmap/appointment_finder" fab:fab_size="mini"/> <com.getbase.floatingactionbutton.floatingactionbutton android:id="@+id/new_ralph" android:layout_width="wrap_content" android:layout_height="wrap_content" fab:fab_colornormal="@color/fab_color" fab:fab_colorpressed="@color/fab_color" fab:fab_title="@string/new_ralph" fab:fab_icon="@mipmap/new_ralph" fab:fab_size="mini"/> </com.getbase.floatingactionbutton.floatingactionsmenu> </relativelayout> i have tried:
- setting android:visibility attribute gone or visible base on isexpanded()-state of floatingactionsmenu
- setting android:duplicateparentstate="true"
the full xml-code of screen is:
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingtop="@dimen/activity_vertical_margin" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:background="@drawable/aachen_background"> <android.support.v7.widget.cardview android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="16dp" android:id="@+id/maincard" app:cardbackgroundcolor="@color/transparent" app:cardcornerradius="@dimen/maincard_corner_radius"> <linearlayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" android:layout_margin="20dp"> <!-- left part: time , beneath calendar ralphevent --> <linearlayout android:layout_width="174dp" android:layout_height="wrap_content" android:orientation="vertical"> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/maincard_get_up_time" android:gravity="start" android:textsize="60sp" android:text="@string/maincard_get_up_time" android:textcolor="@color/maincard_text_color" /> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/maincard_event_start" android:textsize="20sp" android:text="@string/maincard_event_start" android:textcolor="@color/maincard_text_color" android:paddingtop="15dp" /> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/maincard_event_title" android:textsize="35sp" android:text="@string/maincard_event_title" android:textcolor="@color/maincard_text_color" android:ellipsize="end" android:singleline="true"/> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/maincard_event_location" android:text="@string/maincard_event_location" android:textsize="20sp" android:textcolor="@color/maincard_text_color" android:paddingbottom="15dp" android:ellipsize="end" android:singleline="true"/> </linearlayout> <!-- right part: weather , transportation info --> <linearlayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:gravity="right"> <imageview android:layout_width="40dp" android:layout_height="40dp" android:paddingright="5dp" android:contentdescription="@string/weather_icon" android:id="@+id/maincard_weather_icon" android:src="@drawable/weather_icon_rain" /> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/maincard_weather" android:text="@string/maincard_weather" android:layout_gravity="center_vertical" android:textsize="30sp" android:textcolor="@color/maincard_secondary_color" /> </linearlayout> <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:paddingtop="10dp" android:gravity="right"> <imageview android:layout_width="wrap_content" android:layout_height="40dp" android:paddingright="5dp" android:contentdescription="@string/bus_icon" android:id="@+id/maincard_transport_icon" android:src="@drawable/transport_icon_bus" /> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:id="@+id/maincard_departure_time" android:text="@string/maincard_departure_time" android:textsize="30sp" android:textcolor="@color/maincard_secondary_color" /> </linearlayout> </linearlayout> </linearlayout> </android.support.v7.widget.cardview> <android.support.v7.widget.recyclerview android:duplicateparentstate="true" android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/multi_cards" android:layout_below="@id/maincard" /> <com.getbase.floatingactionbutton.floatingactionsmenu android:id="@+id/action_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:clickable="true" fab:fab_addbuttoncolornormal="@color/fab_color" app:fab_addbuttoncolorpressed="@color/fab_color" fab:fab_addbuttonplusiconcolor="@color/black_semi_transparent" fab:fab_addbuttonsize="normal" fab:fab_labelsposition="left" fab:fab_labelstyle="@style/menu_labels_style" app:fab_addbuttonstrokevisible="false" android:layout_alignparentbottom="true" android:layout_alignparentend="true" android:layout_below="@+id/maincard"> <com.getbase.floatingactionbutton.floatingactionbutton android:id="@+id/find_activity" android:layout_width="wrap_content" android:layout_height="wrap_content" fab:fab_colornormal="@color/fab_color" fab:fab_colorpressed="@color/fab_color" fab:fab_title="@string/find_activity" fab:fab_icon="@mipmap/find_activity" fab:fab_size="mini" /> <com.getbase.floatingactionbutton.floatingactionbutton android:id="@+id/appointment_finder" android:layout_width="wrap_content" android:layout_height="wrap_content" fab:fab_colornormal="@color/fab_color" fab:fab_colorpressed="@color/fab_color" fab:fab_title="@string/appointment_finder" fab:fab_icon="@mipmap/appointment_finder" fab:fab_size="mini"/> <com.getbase.floatingactionbutton.floatingactionbutton android:id="@+id/new_ralph" android:layout_width="wrap_content" android:layout_height="wrap_content" fab:fab_colornormal="@color/fab_color" fab:fab_colorpressed="@color/fab_color" fab:fab_title="@string/new_ralph" fab:fab_icon="@mipmap/new_ralph" fab:fab_size="mini"/> </com.getbase.floatingactionbutton.floatingactionsmenu> </relativelayout> <android.support.design.widget.navigationview android:id="@+id/navigation_view" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="start" android:background="@android:color/white" app:headerlayout="@layout/navigation_drawer" />
what removing line floatingactionsmenu?:
android:clickable="true"
Comments
Post a Comment