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.
This commit is contained in:
Peter Serwylo 2017-04-11 14:59:06 +10:00
parent 6891752672
commit b9129e8a35
2 changed files with 6 additions and 0 deletions

View File

@ -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) {

View File

@ -9,6 +9,7 @@
android:paddingBottom="5dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:background="?attr/selectableItemBackground"
>
<TextView android:id="@+id/version"