From 34c741f8359c5852ea12f2f940a38293a6b3841c Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Fri, 7 Apr 2017 14:59:54 +1000 Subject: [PATCH] Clear up confusion around "Tick" icon when updating app. When navigating to Updates -> Show Apps and then downloading an item, it shows the download progress inline for that item. After this is complete, it then shows a tick icon next to the item. The long term goal should be to remove the list item from under "Show Apps" so that it is only shown at the top of the "Updates" view. However this will require more work. In the meantime, we can alleviate some confusion by replacing the "Tick" icon with a button that says "Update" (like the other buttons in the Update view). --- .../views/apps/AppListItemController.java | 6 ++-- .../res/drawable/ic_download_complete.xml | 33 ------------------- .../res/layout/updateable_app_list_item.xml | 16 ++++++++- 3 files changed, 17 insertions(+), 38 deletions(-) delete mode 100644 app/src/main/res/drawable/ic_download_complete.xml diff --git a/app/src/main/java/org/fdroid/fdroid/views/apps/AppListItemController.java b/app/src/main/java/org/fdroid/fdroid/views/apps/AppListItemController.java index 08e349509..92b01e730 100644 --- a/app/src/main/java/org/fdroid/fdroid/views/apps/AppListItemController.java +++ b/app/src/main/java/org/fdroid/fdroid/views/apps/AppListItemController.java @@ -329,9 +329,7 @@ public class AppListItemController extends RecyclerView.ViewHolder { } if (isReadyToInstall(app)) { - installButton.setImageDrawable(ContextCompat.getDrawable(activity, R.drawable.ic_download_complete)); - installButton.setVisibility(View.VISIBLE); - // TODO: If in the downloading phase, then need to reflect that instead of this "download complete" icon. + installButton.setVisibility(View.GONE); } else { boolean installable = app.canAndWantToUpdate(activity) || !app.isInstalled(); boolean shouldAllow = app.compatible && !app.isFiltered(); @@ -386,7 +384,7 @@ public class AppListItemController extends RecyclerView.ViewHolder { private void onDownloadComplete() { if (installButton != null) { - installButton.setImageDrawable(ContextCompat.getDrawable(activity, R.drawable.ic_download_complete)); + installButton.setVisibility(View.GONE); } if (progressBar != null) { diff --git a/app/src/main/res/drawable/ic_download_complete.xml b/app/src/main/res/drawable/ic_download_complete.xml deleted file mode 100644 index 5074a5848..000000000 --- a/app/src/main/res/drawable/ic_download_complete.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - diff --git a/app/src/main/res/layout/updateable_app_list_item.xml b/app/src/main/res/layout/updateable_app_list_item.xml index 161116c87..1ee83c0e4 100644 --- a/app/src/main/res/layout/updateable_app_list_item.xml +++ b/app/src/main/res/layout/updateable_app_list_item.xml @@ -55,8 +55,22 @@ android:layout_marginRight="16dp" android:layout_marginTop="8dp" android:layout_marginBottom="8dp" - app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintEnd_toStartOf="@+id/action_button" app:layout_constraintTop_toTopOf="@+id/icon" app:layout_constraintBottom_toBottomOf="@+id/icon" /> +