Added a FloatingActionButton to the conversation_fragment that appears and disappears using the same logic as the existing compose divider: appear when the conversation list is scrolled away from the bottom, disappear when the list is scrolled to the bottom. Fixes #5651
36 lines
1.5 KiB
XML
36 lines
1.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="match_parent">
|
|
|
|
<android.support.v7.widget.RecyclerView
|
|
android:id="@android:id/list"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:scrollbars="vertical"
|
|
android:cacheColorHint="?conversation_background" />
|
|
|
|
|
|
<!--suppress AndroidLintUnusedAttribute-->
|
|
<View android:id="@+id/compose_divider"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="2dp"
|
|
android:layout_gravity="bottom"
|
|
android:background="@drawable/compose_divider_background"
|
|
android:alpha="0"
|
|
android:visibility="invisible" />
|
|
|
|
<android.support.design.widget.FloatingActionButton
|
|
android:id="@+id/scroll_to_bottom_button"
|
|
android:visibility="invisible"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="@dimen/scroll_to_bottom_button_margin_end"
|
|
android:layout_marginRight="@dimen/scroll_to_bottom_button_margin_end"
|
|
android:layout_marginBottom="@dimen/scroll_to_bottom_button_margin_bottom"
|
|
android:layout_gravity="bottom|end"
|
|
android:contentDescription="@string/conversation_fragment__scroll_to_the_bottom_content_description"
|
|
android:src="@drawable/ic_keyboard_arrow_down_white_36dp" />
|
|
|
|
</FrameLayout>
|