From 002d356ece28668e43c72e8da8e13960a1544c26 Mon Sep 17 00:00:00 2001 From: Peter Serwylo <peter@serwylo.com> Date: Sat, 7 Nov 2015 09:05:10 +1100 Subject: [PATCH] Ensure the "no apps to display" doesn't overlap with the category spinner. There is no layout .xml file for the updated/installed list, but there is for the available apps list. As a result, the `TextView` containing the empty list message is added dynamically. With the recent improvements to the category spinner, a `RelativeLayout` was used instead of a `ListView`. To remedy this, the layout has been augmented to ensure the dynamically added `TextView` still displays correctly. --- F-Droid/res/layout/available_app_list.xml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/F-Droid/res/layout/available_app_list.xml b/F-Droid/res/layout/available_app_list.xml index 5757abad2..90cab4432 100644 --- a/F-Droid/res/layout/available_app_list.xml +++ b/F-Droid/res/layout/available_app_list.xml @@ -19,11 +19,21 @@ android:layout_alignBottom="@id/category_spinner" android:background="@color/fdroid_green" /> - <ListView - android:id="@android:id/list" - android:fastScrollEnabled="true" + <!-- The empty app list message gets shown on the parent of the @android:id/list. + For the update/installed lists, this is not a problem as it is attached to the linear + layout the list is in. However here, it will end up in the relative layout which + causes sadness. This FrameLayout is here so that the empty message will get shown here. --> + <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_below="@id/category_spinner" /> + android:layout_below="@id/category_spinner"> + + <ListView + android:id="@android:id/list" + android:fastScrollEnabled="true" + android:layout_width="match_parent" + android:layout_height="match_parent" /> + + </FrameLayout> </RelativeLayout>