From b9129e8a35322cef493d43bfbafbffb0ccb2c937 Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Tue, 11 Apr 2017 14:59:06 +1000 Subject: [PATCH] Provide feedback to user when installing previous version. Given the only feedback available to the user that they initiated a download once clicking the version from the list is up top, this scrolls the recycler view to the top to show that feedback. Also shows the selectable background when they touch the version list items. --- app/src/main/java/org/fdroid/fdroid/AppDetails2.java | 5 +++++ app/src/main/res/layout/apklistitem.xml | 1 + 2 files changed, 6 insertions(+) diff --git a/app/src/main/java/org/fdroid/fdroid/AppDetails2.java b/app/src/main/java/org/fdroid/fdroid/AppDetails2.java index cf242b497..40f17cb55 100644 --- a/app/src/main/java/org/fdroid/fdroid/AppDetails2.java +++ b/app/src/main/java/org/fdroid/fdroid/AppDetails2.java @@ -369,6 +369,11 @@ public class AppDetails2 extends AppCompatActivity implements ShareChooserDialog return; } initiateInstall(apk); + + // Scroll back to the header, so that the user can see the progress beginning. This can be + // removed once https://gitlab.com/fdroid/fdroidclient/issues/903 is implemented. However + // for now it adds valuable feedback to the user about the download they just initiated. + ((LinearLayoutManager) recyclerView.getLayoutManager()).scrollToPositionWithOffset(0, 0); } private void initiateInstall(Apk apk) { diff --git a/app/src/main/res/layout/apklistitem.xml b/app/src/main/res/layout/apklistitem.xml index 6989b9286..57ac5405a 100644 --- a/app/src/main/res/layout/apklistitem.xml +++ b/app/src/main/res/layout/apklistitem.xml @@ -9,6 +9,7 @@ android:paddingBottom="5dp" android:paddingLeft="10dp" android:paddingRight="10dp" + android:background="?attr/selectableItemBackground" >