diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-02-10 12:59:18 -0300 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-02-10 12:59:18 -0300 |
| commit | c9b3e7f007b0dd340ea810bca05abef36a325b7f (patch) | |
| tree | 9f97bb036d5ffebb87151286605d338269a04e1f /android/src/main/res | |
| parent | a043900434227595f05002abf65a3684e1ceb27a (diff) | |
| parent | 4b78acd9e140044b7faa46ec08d40ced06ad39df (diff) | |
| download | mullvadvpn-c9b3e7f007b0dd340ea810bca05abef36a325b7f.tar.xz mullvadvpn-c9b3e7f007b0dd340ea810bca05abef36a325b7f.zip | |
Merge branch 'allow-lan-ui-setting'
Diffstat (limited to 'android/src/main/res')
| -rw-r--r-- | android/src/main/res/drawable/cell_switch_background.xml | 27 | ||||
| -rw-r--r-- | android/src/main/res/layout/preferences.xml | 78 | ||||
| -rw-r--r-- | android/src/main/res/layout/settings.xml | 35 | ||||
| -rw-r--r-- | android/src/main/res/values/dimensions.xml | 6 | ||||
| -rw-r--r-- | android/src/main/res/values/strings.xml | 6 |
5 files changed, 149 insertions, 3 deletions
diff --git a/android/src/main/res/drawable/cell_switch_background.xml b/android/src/main/res/drawable/cell_switch_background.xml new file mode 100644 index 0000000000..71f6fe0802 --- /dev/null +++ b/android/src/main/res/drawable/cell_switch_background.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector + xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle" + > + <item android:state_enabled="false"> + <shape android:shape="rectangle"> + <corners android:radius="@dimen/cell_switch_border_radius"/> + <stroke android:color="@color/white20" android:width="2dp"/> + <size + android:width="@dimen/cell_switch_width" + android:height="@dimen/cell_switch_height" + /> + </shape> + </item> + + <item android:state_enabled="true"> + <shape android:shape="rectangle"> + <corners android:radius="@dimen/cell_switch_border_radius"/> + <stroke android:color="@color/white" android:width="2dp"/> + <size + android:width="@dimen/cell_switch_width" + android:height="@dimen/cell_switch_height" + /> + </shape> + </item> +</selector> diff --git a/android/src/main/res/layout/preferences.xml b/android/src/main/res/layout/preferences.xml new file mode 100644 index 0000000000..59d42635fe --- /dev/null +++ b/android/src/main/res/layout/preferences.xml @@ -0,0 +1,78 @@ +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@color/darkBlue" + android:orientation="vertical" + android:gravity="left" + android:elevation="2dp" + > + <LinearLayout android:id="@+id/back" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="12dp" + android:orientation="horizontal" + android:gravity="center_vertical | left" + android:clickable="true" + android:background="?android:attr/selectableItemBackground" + > + <ImageView + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_marginRight="8dp" + android:src="@drawable/icon_back" + /> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="@color/white60" + android:textSize="13sp" + android:textStyle="bold" + android:text="@string/settings" + /> + </LinearLayout> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="4dp" + android:layout_marginLeft="24dp" + android:textColor="@color/white" + android:textSize="32sp" + android:textStyle="bold" + android:text="@string/settings_preferences" + /> + <LinearLayout android:id="@+id/allow_lan" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="24dp" + android:paddingHorizontal="16dp" + android:background="@drawable/cell_button_background" + android:gravity="center" + > + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_weight="1" + android:paddingHorizontal="8dp" + android:paddingVertical="17dp" + android:textColor="@color/white" + android:textSize="20sp" + android:textStyle="bold" + android:text="@string/local_network_sharing" + /> + <net.mullvad.mullvadvpn.ui.CellSwitch android:id="@+id/allow_lan_toggle" + android:layout_width="52dp" + android:layout_height="32dp" + android:layout_weight="0" + /> + </LinearLayout> + <TextView android:id="@+id/allow_lan_footer" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingTop="8dp" + android:paddingHorizontal="24dp" + android:textColor="@color/white60" + android:textSize="13sp" + android:text="@string/allow_lan_footer" + /> +</LinearLayout> diff --git a/android/src/main/res/layout/settings.xml b/android/src/main/res/layout/settings.xml index 37cf3cb9db..c36c9bb3e8 100644 --- a/android/src/main/res/layout/settings.xml +++ b/android/src/main/res/layout/settings.xml @@ -19,7 +19,6 @@ android:layout_height="wrap_content" android:layout_marginTop="4dp" android:layout_marginLeft="24dp" - android:layout_marginBottom="24dp" android:textColor="@color/white" android:textSize="32sp" android:textStyle="bold" @@ -28,7 +27,7 @@ <LinearLayout android:id="@+id/account" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginBottom="24dp" + android:layout_marginTop="24dp" android:paddingHorizontal="16dp" android:background="@drawable/cell_button_background" android:clickable="true" @@ -66,10 +65,39 @@ android:src="@drawable/icon_chevron" /> </LinearLayout> + <LinearLayout android:id="@+id/preferences" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="1dp" + android:paddingHorizontal="16dp" + android:background="@drawable/cell_button_background" + android:clickable="true" + android:gravity="center" + android:visibility="gone" + > + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_weight="1" + android:paddingHorizontal="8dp" + android:paddingVertical="17dp" + android:textColor="@color/white" + android:textSize="20sp" + android:textStyle="bold" + android:text="@string/settings_preferences" + /> + <ImageView + android:layout_width="14dp" + android:layout_height="24dp" + android:layout_weight="0" + android:alpha="0.6" + android:src="@drawable/icon_chevron" + /> + </LinearLayout> <LinearLayout android:id="@+id/wireguard_keys" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginBottom="24dp" + android:layout_marginTop="24dp" android:paddingHorizontal="16dp" android:background="@drawable/cell_button_background" android:clickable="true" @@ -98,6 +126,7 @@ <LinearLayout android:id="@+id/app_version" android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_marginTop="24dp" android:paddingHorizontal="16dp" android:background="@drawable/cell_button_background" android:clickable="true" diff --git a/android/src/main/res/values/dimensions.xml b/android/src/main/res/values/dimensions.xml index 800e1ed0ac..5d106210ea 100644 --- a/android/src/main/res/values/dimensions.xml +++ b/android/src/main/res/values/dimensions.xml @@ -6,4 +6,10 @@ <dimen name="account_input_corner_radius">4dp</dimen> <dimen name="normal_button_height">44dp</dimen> <dimen name="tall_button_height">64dp</dimen> + <dimen name="cell_switch_border_radius">16dp</dimen> + <dimen name="cell_switch_width">32dp</dimen> + <dimen name="cell_switch_height">52dp</dimen> + <dimen name="cell_switch_knob_margin">4dp</dimen> + <dimen name="cell_switch_knob_max_translation">20dp</dimen> + <dimen name="cell_switch_knob_size">24dp</dimen> </resources> diff --git a/android/src/main/res/values/strings.xml b/android/src/main/res/values/strings.xml index d019f68b17..0a87ff3736 100644 --- a/android/src/main/res/values/strings.xml +++ b/android/src/main/res/values/strings.xml @@ -29,6 +29,7 @@ <string name="settings_account">Account</string> <string name="less_than_a_day_left">less than a day left</string> <string name="out_of_time">Out of time</string> + <string name="settings_preferences">Preferences</string> <string name="app_version">App version</string> <string name="update_available_footer">Update available, download to remain safe.</string> <string name="report_a_problem">Report a problem</string> @@ -40,6 +41,11 @@ <string name="paid_until">Paid until</string> <string name="log_out">Log out</string> + <string name="local_network_sharing">Local network sharing</string> + <string name="allow_lan_footer"> + Allows access to other devices on the same network for sharing, printing etc. + </string> + <string name="problem_report_description"> To help you more effectively, your app\'s log file will be attached to this message. Your data will remain secure and private, as it is anonymised before being sent over an encrypted |
