From 92f71ca13aaed4574d9f3a2b4d4be79a77c3f555 Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Thu, 4 Sep 2014 19:02:57 +0930 Subject: [PATCH] Ability to cancel swap. Made QR code larger. Added a "Cancel" button to the swap QR code screen. Also changed how the LocalRepoService deals with onDestroy(). Previously, it would invoke `stopNetworkServices()` on the UI thread, blocking for a significant portion of time (enough to cause ANR messages on my devices). Now, it does this on a new thread. As for the QR code size, it was getting quite small on my nexus 4, which I think has a large screen (even though there is much larger about). As a result, it couldn't be scanned properly using barcode scanner. This is the first major diversion from carries mockups, in that the qr view is now in a scroller, which means the "Open QR Code Scanner" button may well not be visible on the main screen on small devices. Not sure about how to manage this tradeoff between biggish qr code but everything viewable on one screen. --- res/layout/swap_wifi_qr.xml | 89 ++++++++++--------- res/values/styles.xml | 2 +- src/org/fdroid/fdroid/FDroidApp.java | 15 ++-- src/org/fdroid/fdroid/QrGenAsyncTask.java | 7 +- .../fdroid/localrepo/LocalRepoService.java | 60 +++++++++---- .../fdroid/views/LocalRepoActivity.java | 2 +- .../fdroid/views/swap/SwapActivity.java | 22 ++++- .../fdroid/views/swap/SwapProcessManager.java | 1 + .../fdroid/views/swap/WifiQrFragment.java | 15 ++++ 9 files changed, 139 insertions(+), 74 deletions(-) diff --git a/res/layout/swap_wifi_qr.xml b/res/layout/swap_wifi_qr.xml index b916b0332..ae9af93b1 100644 --- a/res/layout/swap_wifi_qr.xml +++ b/res/layout/swap_wifi_qr.xml @@ -1,50 +1,53 @@ - + - - + - + -