
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.
53 lines
2.0 KiB
XML
53 lines
2.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<ScrollView
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:layout_height="match_parent"
|
|
android:layout_width="wrap_content">
|
|
|
|
<LinearLayout android:orientation="vertical"
|
|
android:gravity="center"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:id="@+id/textView"
|
|
android:text="One person needs to scan the code, or type the URL of the other swapper into a browser."
|
|
style="@style/SwapTheme.Wizard.MainText"/>
|
|
|
|
<ImageView
|
|
android:layout_width="250dp"
|
|
android:layout_height="250dp"
|
|
android:maxHeight="20dp"
|
|
android:id="@+id/wifi_qr_code"
|
|
tools:src="@drawable/swap_qr_example"/>
|
|
|
|
<!--
|
|
<Button style="@style/SwapTheme.Wizard.OptionButton"
|
|
android:id="@+id/btn_not_working"
|
|
android:text="@string/swap_wifi_qr_not_working"
|
|
android:layout_alignParentBottom="true" />
|
|
-->
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:id="@+id/device_ip_address"
|
|
tools:text="http://255.255.255.255:8888"
|
|
style="@style/SwapTheme.Wizard.LocalIpAddress"/>
|
|
|
|
<Button style="@style/SwapTheme.Wizard.OptionButton"
|
|
android:text="@string/open_qr_code_scanner"
|
|
android:layout_gravity="center"
|
|
android:id="@+id/btn_qr_scanner"/>
|
|
|
|
<Button style="@style/SwapTheme.Wizard.OptionButton"
|
|
android:id="@+id/btn_cancel_swap"
|
|
android:text="@string/cancel" />
|
|
|
|
</LinearLayout>
|
|
|
|
</ScrollView> |