Ensure the "Apply" button is always visible (#3004)

On smaller devices the notification filter listview may be longer than the
screen height, and pushes the "Apply" button out of sight.

Fix this by:

- Set the height of the listview to 0dp and its layout_weight to 1
- Set the layout_weight of the button to 0

This ensures the button always appears (because the listview height is 0dp)
and the listview then expands to fill any remaining space (because the
layout_weight is 1).

Fixes https://github.com/tuskyapp/Tusky/issues/2985
This commit is contained in:
Nik Clayton 2022-12-06 20:31:16 +01:00 committed by GitHub
parent 08642d7bdb
commit 48ad2f9eee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,12 +6,14 @@
<ListView
android:id="@+id/listView"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
android:layout_height="0dp"
android:layout_weight="1" />
<Button
android:id="@+id/buttonApply"
style="@style/TuskyButton.TextButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:text="@string/filter_apply"
android:textSize="?attr/status_text_medium" />
</LinearLayout>