Add scroll to bottom button in conversation view

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
This commit is contained in:
Stuart Gilbert
2017-01-23 00:34:10 -08:00
committed by Moxie Marlinspike
parent 4c815db076
commit aa9d8e4d14
4 changed files with 32 additions and 2 deletions

View File

@@ -21,4 +21,16 @@
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>

View File

@@ -66,4 +66,7 @@
<dimen name="onboarding_subtitle_size">20sp</dimen>
<dimen name="scribble_stroke_size">3dp</dimen>
<dimen name="scroll_to_bottom_button_margin_end">10dp</dimen>
<dimen name="scroll_to_bottom_button_margin_bottom">10dp</dimen>
</resources>

View File

@@ -729,6 +729,9 @@
<string name="conversation_fragment_cab__batch_selection_mode">Batch selection mode</string>
<string name="conversation_fragment_cab__batch_selection_amount">%s selected</string>
<!-- conversation_fragment -->
<string name="conversation_fragment__scroll_to_the_bottom_content_description">Scroll to the bottom</string>
<!-- country_selection_fragment -->
<string name="country_selection_fragment__loading_countries">Loading countries...</string>
<string name="country_selection_fragment__search">Search</string>