2014-08-19 15:37:44 +09:30
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2019-06-17 10:10:20 +02:00
|
|
|
<org.fdroid.fdroid.nearby.StartSwapView
|
2019-05-06 10:50:44 +02:00
|
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
|
xmlns:tools="http://schemas.android.com/tools"
|
2018-08-07 13:38:16 +02:00
|
|
|
xmlns:swap="http://schemas.android.com/apk/res-auto"
|
|
|
|
swap:toolbarColor="@color/swap_bright_blue"
|
|
|
|
swap:toolbarTitle="@string/swap_nearby"
|
2019-05-06 10:50:44 +02:00
|
|
|
android:orientation="vertical"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
2019-06-17 10:10:20 +02:00
|
|
|
tools:context=".nearby.SwapWorkflowActivity">
|
2015-06-21 10:05:38 +10:00
|
|
|
|
2016-05-15 10:45:56 +10:00
|
|
|
<!-- Misc header -->
|
2019-05-06 10:50:44 +02:00
|
|
|
<include layout="@layout/start_swap_header"/>
|
2016-05-15 10:45:56 +10:00
|
|
|
|
|
|
|
<!-- Bluetooth swap status + toggle -->
|
2015-06-21 10:05:38 +10:00
|
|
|
<LinearLayout
|
2019-05-06 10:50:44 +02:00
|
|
|
android:id="@+id/bluetooth_info"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_below="@id/header"
|
|
|
|
android:padding="10dp"
|
|
|
|
android:orientation="horizontal">
|
2015-06-21 10:05:38 +10:00
|
|
|
|
2016-05-15 10:45:56 +10:00
|
|
|
<ImageView
|
2019-05-06 10:50:44 +02:00
|
|
|
android:layout_width="24dp"
|
|
|
|
android:layout_height="24dp"
|
2019-05-16 10:11:56 +02:00
|
|
|
android:contentDescription="@string/use_bluetooth"
|
2021-02-23 13:07:32 +08:00
|
|
|
swap:srcCompat="@drawable/ic_bluetooth_searching"/>
|
2015-06-21 10:05:38 +10:00
|
|
|
|
2015-06-28 23:25:16 +10:00
|
|
|
<LinearLayout
|
2019-05-06 10:50:44 +02:00
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:orientation="vertical"
|
|
|
|
android:paddingLeft="15dp"
|
|
|
|
android:paddingStart="15dp"
|
|
|
|
android:layout_weight="1.00"
|
|
|
|
tools:ignore="RtlSymmetry">
|
2015-06-21 10:05:38 +10:00
|
|
|
|
2016-05-15 10:45:56 +10:00
|
|
|
<TextView
|
2019-05-06 10:50:44 +02:00
|
|
|
android:id="@+id/bluetooth_visible"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2019-05-22 16:21:54 +02:00
|
|
|
tools:text="@string/swap_not_visible_bluetooth"
|
2019-05-06 10:50:44 +02:00
|
|
|
android:textSize="18sp"/>
|
2016-05-15 10:45:56 +10:00
|
|
|
|
|
|
|
<TextView
|
2019-05-06 10:50:44 +02:00
|
|
|
android:id="@+id/device_id_bluetooth"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
tools:text="SP-120"
|
|
|
|
android:textColor="@color/swap_light_text"/>
|
2015-06-21 10:05:38 +10:00
|
|
|
|
2015-06-28 23:25:16 +10:00
|
|
|
</LinearLayout>
|
2015-06-21 10:05:38 +10:00
|
|
|
|
2021-05-18 07:47:39 +08:00
|
|
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
2019-05-06 10:50:44 +02:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:enabled="false"
|
|
|
|
android:id="@+id/switch_bluetooth"/>
|
2015-06-21 10:05:38 +10:00
|
|
|
|
2016-05-15 10:45:56 +10:00
|
|
|
</LinearLayout>
|
2015-06-21 10:05:38 +10:00
|
|
|
|
2016-05-15 10:45:56 +10:00
|
|
|
<!-- WiFi swap status + toggle -->
|
|
|
|
<LinearLayout
|
2019-05-06 10:50:44 +02:00
|
|
|
android:id="@+id/wifi_info"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_below="@id/bluetooth_info"
|
|
|
|
android:padding="10dp"
|
|
|
|
android:orientation="horizontal">
|
2015-06-21 10:05:38 +10:00
|
|
|
|
2016-05-15 10:45:56 +10:00
|
|
|
<ImageView
|
2019-05-06 10:50:44 +02:00
|
|
|
android:layout_width="24dp"
|
|
|
|
android:layout_height="24dp"
|
2019-05-16 10:11:56 +02:00
|
|
|
android:contentDescription="@string/wifi"
|
2021-02-23 13:07:32 +08:00
|
|
|
swap:srcCompat="@drawable/ic_wifi"/>
|
2015-06-21 10:05:38 +10:00
|
|
|
|
2015-06-28 23:25:16 +10:00
|
|
|
<LinearLayout
|
2019-05-06 10:50:44 +02:00
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:orientation="vertical"
|
|
|
|
android:paddingLeft="15dp"
|
|
|
|
android:paddingStart="15dp"
|
|
|
|
android:layout_weight="1.00"
|
|
|
|
tools:ignore="RtlSymmetry">
|
2016-05-15 10:45:56 +10:00
|
|
|
|
|
|
|
<TextView
|
2019-05-06 10:50:44 +02:00
|
|
|
android:id="@+id/wifi_visible"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2019-05-21 18:04:57 +02:00
|
|
|
tools:text="@string/swap_starting"
|
2019-05-06 10:50:44 +02:00
|
|
|
android:textSize="18sp"/>
|
2015-06-21 10:05:38 +10:00
|
|
|
|
2015-06-28 23:25:16 +10:00
|
|
|
<TextView
|
2019-05-06 10:50:44 +02:00
|
|
|
android:id="@+id/device_id_wifi"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/swap_wifi_device_name"
|
|
|
|
android:textColor="@color/swap_light_text"/>
|
2015-06-21 10:05:38 +10:00
|
|
|
|
2016-05-15 10:45:56 +10:00
|
|
|
<TextView
|
2019-05-06 10:50:44 +02:00
|
|
|
android:id="@+id/wifi_network"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2019-05-24 15:27:24 +02:00
|
|
|
android:minWidth="150dp"
|
2019-05-06 10:50:44 +02:00
|
|
|
tools:text="wifi network name"
|
|
|
|
android:textColor="@color/swap_bright_blue"
|
|
|
|
android:textSize="16sp"/>
|
2015-06-21 10:05:38 +10:00
|
|
|
|
2015-06-28 23:25:16 +10:00
|
|
|
</LinearLayout>
|
2015-06-21 10:05:38 +10:00
|
|
|
|
2021-05-18 07:47:39 +08:00
|
|
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
2019-05-06 10:50:44 +02:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:id="@+id/switch_wifi"/>
|
2016-05-15 10:45:56 +10:00
|
|
|
|
|
|
|
</LinearLayout>
|
2015-06-21 10:05:38 +10:00
|
|
|
|
2016-05-15 10:45:56 +10:00
|
|
|
<!-- Feedback for "searching for nearby people..." -->
|
|
|
|
<LinearLayout
|
2019-05-06 10:50:44 +02:00
|
|
|
android:id="@+id/feedback_searching"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_below="@+id/wifi_info"
|
|
|
|
android:paddingStart="20dp"
|
|
|
|
android:paddingEnd="20dp"
|
|
|
|
android:paddingBottom="5dp"
|
|
|
|
android:paddingTop="20dp">
|
2014-08-19 15:37:44 +09:30
|
|
|
|
2015-06-28 23:25:16 +10:00
|
|
|
<TextView
|
2019-05-06 10:50:44 +02:00
|
|
|
android:id="@+id/text_people_nearby"
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/swap_people_nearby"
|
|
|
|
android:textColor="@color/swap_light_text"
|
|
|
|
android:layout_weight="1.00"/>
|
2015-06-21 11:17:54 +10:00
|
|
|
|
2016-05-15 10:45:56 +10:00
|
|
|
<ProgressBar
|
2019-05-06 10:50:44 +02:00
|
|
|
android:id="@+id/searching_people_nearby"
|
|
|
|
android:layout_width="24dp"
|
|
|
|
android:layout_height="24dp"
|
|
|
|
android:indeterminate="true"/>
|
2015-06-21 10:05:38 +10:00
|
|
|
|
2016-05-15 10:45:56 +10:00
|
|
|
</LinearLayout>
|
2015-06-21 10:05:38 +10:00
|
|
|
|
2016-05-15 10:45:56 +10:00
|
|
|
|
|
|
|
<!-- Buttons to help the user when they can't find any peers. Shown at bottom of relative layout -->
|
|
|
|
<LinearLayout
|
2019-05-06 10:50:44 +02:00
|
|
|
android:id="@+id/cant_find_peers"
|
|
|
|
android:orientation="horizontal"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_alignParentBottom="true">
|
2016-05-15 10:45:56 +10:00
|
|
|
|
|
|
|
<Button
|
2021-02-04 21:43:59 +00:00
|
|
|
android:id="@+id/btn_send_fdroid"
|
2021-06-02 10:21:14 +00:00
|
|
|
style="@style/Widget.App.Button.TextButton"
|
2021-02-04 21:43:59 +00:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
swap:icon="@drawable/ic_fdroid_grey"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/swap_send_fdroid" />
|
2016-05-15 10:45:56 +10:00
|
|
|
|
|
|
|
<Button
|
2021-02-04 21:43:59 +00:00
|
|
|
android:id="@+id/btn_scan_qr"
|
2021-06-02 10:21:14 +00:00
|
|
|
style="@style/Widget.App.Button.TextButton"
|
2021-02-04 21:43:59 +00:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/swap_scan_qr"
|
|
|
|
swap:icon="@drawable/ic_qr_code" />
|
2015-06-23 22:46:52 +10:00
|
|
|
|
|
|
|
</LinearLayout>
|
2014-08-19 15:37:44 +09:30
|
|
|
|
2016-05-15 10:45:56 +10:00
|
|
|
<!-- Heading for "can't find peers" -->
|
|
|
|
<TextView
|
2019-05-06 10:50:44 +02:00
|
|
|
android:id="@+id/header_cant_find_peers"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_above="@id/cant_find_peers"
|
|
|
|
android:text="@string/swap_cant_find_peers"
|
|
|
|
android:paddingLeft="20dp"
|
|
|
|
android:paddingStart="20dp"
|
|
|
|
android:paddingRight="20dp"
|
|
|
|
android:paddingEnd="20dp"
|
|
|
|
android:paddingTop="20dp"
|
|
|
|
android:textColor="@color/swap_light_text"/>
|
2016-05-15 10:45:56 +10:00
|
|
|
|
|
|
|
<!-- List of all currently known peers (i.e. bluetooth and wifi devices that have been identified -->
|
|
|
|
<ListView
|
2019-05-06 10:50:44 +02:00
|
|
|
android:id="@+id/list_people_nearby"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_below="@id/feedback_searching"
|
|
|
|
android:layout_above="@id/header_cant_find_peers">
|
2016-05-15 10:45:56 +10:00
|
|
|
|
|
|
|
</ListView>
|
|
|
|
|
2019-06-17 10:10:20 +02:00
|
|
|
</org.fdroid.fdroid.nearby.StartSwapView>
|