diff options
author | pacien | 2017-08-24 15:54:31 +0200 |
---|---|---|
committer | pacien | 2017-08-24 16:32:10 +0200 |
commit | cf24442cd7b18ffd7dfe3998ea40d8e5e1d3f16e (patch) | |
tree | f215f87f6b9288ce77bab937570e75cb15e29f2e /app/src/main/res | |
parent | 5bd162da8412d637869b62fe0631106015a11bec (diff) | |
download | tincapp-cf24442cd7b18ffd7dfe3998ea40d8e5e1d3f16e.tar.gz |
Add invitation URL QR code scanning ; Refactor configuration dialogs
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/drawable/ic_photo_camera_primary_24dp.xml | 12 | ||||
-rw-r--r-- | app/src/main/res/layout/dialog_network_generate.xml (renamed from app/src/main/res/layout/dialog_frame.xml) | 12 | ||||
-rw-r--r-- | app/src/main/res/layout/dialog_network_join.xml | 37 | ||||
-rw-r--r-- | app/src/main/res/layout/dialog_node_details.xml (renamed from app/src/main/res/layout/dialog_text_monopsace.xml) | 2 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 3 |
5 files changed, 65 insertions, 1 deletions
diff --git a/app/src/main/res/drawable/ic_photo_camera_primary_24dp.xml b/app/src/main/res/drawable/ic_photo_camera_primary_24dp.xml new file mode 100644 index 0000000..28172b6 --- /dev/null +++ b/app/src/main/res/drawable/ic_photo_camera_primary_24dp.xml | |||
@@ -0,0 +1,12 @@ | |||
1 | <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
2 | android:width="24dp" | ||
3 | android:height="24dp" | ||
4 | android:viewportHeight="24.0" | ||
5 | android:viewportWidth="24.0"> | ||
6 | <path | ||
7 | android:fillColor="@color/textPrimary" | ||
8 | android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0"/> | ||
9 | <path | ||
10 | android:fillColor="@color/textPrimary" | ||
11 | android:pathData="M9,2L7.17,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2L9,2zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z"/> | ||
12 | </vector> | ||
diff --git a/app/src/main/res/layout/dialog_frame.xml b/app/src/main/res/layout/dialog_network_generate.xml index 9b4a512..cc51b7b 100644 --- a/app/src/main/res/layout/dialog_frame.xml +++ b/app/src/main/res/layout/dialog_network_generate.xml | |||
@@ -7,4 +7,16 @@ | |||
7 | android:paddingRight="@dimen/dialog_horizontal_margin" | 7 | android:paddingRight="@dimen/dialog_horizontal_margin" |
8 | android:paddingTop="@dimen/dialog_vertical_margin"> | 8 | android:paddingTop="@dimen/dialog_vertical_margin"> |
9 | 9 | ||
10 | <EditText | ||
11 | android:id="@+id/new_net_name" | ||
12 | android:layout_width="match_parent" | ||
13 | android:layout_height="match_parent" | ||
14 | android:hint="@string/field_net_name"/> | ||
15 | |||
16 | <EditText | ||
17 | android:id="@+id/new_node_name" | ||
18 | android:layout_width="match_parent" | ||
19 | android:layout_height="match_parent" | ||
20 | android:hint="@string/field_node_name"/> | ||
21 | |||
10 | </LinearLayout> | 22 | </LinearLayout> |
diff --git a/app/src/main/res/layout/dialog_network_join.xml b/app/src/main/res/layout/dialog_network_join.xml new file mode 100644 index 0000000..2d23d4b --- /dev/null +++ b/app/src/main/res/layout/dialog_network_join.xml | |||
@@ -0,0 +1,37 @@ | |||
1 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
2 | android:layout_width="match_parent" | ||
3 | android:layout_height="wrap_content" | ||
4 | android:orientation="vertical" | ||
5 | android:paddingBottom="@dimen/dialog_vertical_margin" | ||
6 | android:paddingLeft="@dimen/dialog_horizontal_margin" | ||
7 | android:paddingRight="@dimen/dialog_horizontal_margin" | ||
8 | android:paddingTop="@dimen/dialog_vertical_margin"> | ||
9 | |||
10 | <EditText | ||
11 | android:id="@+id/net_name" | ||
12 | android:layout_width="match_parent" | ||
13 | android:layout_height="wrap_content" | ||
14 | android:hint="@string/field_net_name"/> | ||
15 | |||
16 | <LinearLayout | ||
17 | android:layout_width="match_parent" | ||
18 | android:layout_height="match_parent" | ||
19 | android:orientation="horizontal"> | ||
20 | |||
21 | <EditText | ||
22 | android:id="@+id/invitation_url" | ||
23 | android:layout_width="0dp" | ||
24 | android:layout_height="wrap_content" | ||
25 | android:layout_weight="1" | ||
26 | android:hint="@string/field_invitation_url"/> | ||
27 | |||
28 | <ImageButton | ||
29 | android:layout_width="wrap_content" | ||
30 | android:layout_height="match_parent" | ||
31 | android:contentDescription="@string/action_scan_qr_code" | ||
32 | android:onClick="scanCode" | ||
33 | android:src="@drawable/ic_photo_camera_primary_24dp"/> | ||
34 | |||
35 | </LinearLayout> | ||
36 | |||
37 | </LinearLayout> | ||
diff --git a/app/src/main/res/layout/dialog_text_monopsace.xml b/app/src/main/res/layout/dialog_node_details.xml index b7f6f5b..dc2aae9 100644 --- a/app/src/main/res/layout/dialog_text_monopsace.xml +++ b/app/src/main/res/layout/dialog_node_details.xml | |||
@@ -7,7 +7,7 @@ | |||
7 | android:paddingTop="@dimen/dialog_vertical_margin"> | 7 | android:paddingTop="@dimen/dialog_vertical_margin"> |
8 | 8 | ||
9 | <TextView | 9 | <TextView |
10 | android:id="@+id/dialog_text_monospace" | 10 | android:id="@+id/dialog_node_details" |
11 | android:layout_width="match_parent" | 11 | android:layout_width="match_parent" |
12 | android:layout_height="wrap_content" | 12 | android:layout_height="wrap_content" |
13 | android:fontFamily="monospace"/> | 13 | android:fontFamily="monospace"/> |
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 70a13da..c909933 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml | |||
@@ -50,6 +50,8 @@ | |||
50 | <string name="action_create">Create</string> | 50 | <string name="action_create">Create</string> |
51 | <string name="action_join">Join</string> | 51 | <string name="action_join">Join</string> |
52 | <string name="action_open_manual">Open manual</string> | 52 | <string name="action_open_manual">Open manual</string> |
53 | <string name="action_scan_qr_code">Scan QR code</string> | ||
54 | <string name="action_install">Install</string> | ||
53 | 55 | ||
54 | <string name="message_no_network_configuration_found">No network configuration has been found.</string> | 56 | <string name="message_no_network_configuration_found">No network configuration has been found.</string> |
55 | <string name="message_no_known_node">No known node</string> | 57 | <string name="message_no_known_node">No known node</string> |
@@ -60,6 +62,7 @@ | |||
60 | <string name="message_no_configuration_for_network_format">No configuration has been found for network \"%1$s\".</string> | 62 | <string name="message_no_configuration_for_network_format">No configuration has been found for network \"%1$s\".</string> |
61 | <string name="message_network_config_not_found_format">Network configuration file not found at \"%1$s\".</string> | 63 | <string name="message_network_config_not_found_format">Network configuration file not found at \"%1$s\".</string> |
62 | <string name="message_network_config_invalid_format">Invalid network configuration:\n\n%1$s</string> | 64 | <string name="message_network_config_invalid_format">Invalid network configuration:\n\n%1$s</string> |
65 | <string name="message_no_qr_code_scanner">No scanner could be started.\n\nInstall Barcode Scanner?</string> | ||
63 | 66 | ||
64 | <string name="value_none">none</string> | 67 | <string name="value_none">none</string> |
65 | <string name="value_yes">yes</string> | 68 | <string name="value_yes">yes</string> |