diff options
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/drawable/ic_action_select_all.xml | 8 | ||||
-rw-r--r-- | app/src/main/res/drawable/ic_settings.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/drawable/list_item_background.xml | 8 | ||||
-rw-r--r-- | app/src/main/res/layout/app_list_dialog_fragment.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/layout/app_list_item.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/layout/config_naming_dialog_fragment.xml | 1 | ||||
-rw-r--r-- | app/src/main/res/layout/tunnel_editor_fragment.xml | 6 | ||||
-rw-r--r-- | app/src/main/res/layout/tunnel_editor_peer.xml | 3 | ||||
-rw-r--r-- | app/src/main/res/layout/tunnel_list_fragment.xml | 38 | ||||
-rw-r--r-- | app/src/main/res/menu/main_activity.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/values/attrs.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/values/fab.xml | 20 | ||||
-rw-r--r-- | app/src/main/res/xml/preferences.xml | 2 |
13 files changed, 58 insertions, 51 deletions
diff --git a/app/src/main/res/drawable/ic_action_select_all.xml b/app/src/main/res/drawable/ic_action_select_all.xml index 2ddfb85a..9c560297 100644 --- a/app/src/main/res/drawable/ic_action_select_all.xml +++ b/app/src/main/res/drawable/ic_action_select_all.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="utf-8"?> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:viewportWidth="24" - android:viewportHeight="24" android:width="24dp" - android:height="24dp"> + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24"> <path android:fillColor="?android:attr/colorForeground" android:pathData="M3 5L5 5 5 3C3.9 3 3 3.9 3 5Zm0 8l2 0 0 -2 -2 0 0 2zm4 8l2 0 0 -2 -2 0 0 2zM3 9L5 9 5 7 3 7 3 9Zm10 -6l-2 0 0 2 2 0 0 -2zm6 0l0 2 2 0C21 3.9 20.1 3 19 3ZM5 21L5 19 3 19c0 1.1 0.9 2 2 2zm-2 -4l2 0 0 -2 -2 0 0 2zM9 3L7 3 7 5 9 5 9 3Zm2 18l2 0 0 -2 -2 0 0 2zm8 -8l2 0 0 -2 -2 0 0 2zm0 8c1.1 0 2 -0.9 2 -2l-2 0 0 2zm0 -12l2 0 0 -2 -2 0 0 2zm0 8l2 0 0 -2 -2 0 0 2zm-4 4l2 0 0 -2 -2 0 0 2zm0 -16l2 0 0 -2 -2 0 0 2zM7 17L17 17 17 7 7 7 7 17Zm2 -8l6 0 0 6 -6 0 0 -6z" /> -</vector>
\ No newline at end of file +</vector> diff --git a/app/src/main/res/drawable/ic_settings.xml b/app/src/main/res/drawable/ic_settings.xml index e8571eb3..aabfce2a 100644 --- a/app/src/main/res/drawable/ic_settings.xml +++ b/app/src/main/res/drawable/ic_settings.xml @@ -5,5 +5,5 @@ android:viewportWidth="24"> <path android:fillColor="?android:attr/colorForeground" - android:pathData="M12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,16c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z"/> + android:pathData="M12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,16c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z" /> </vector> diff --git a/app/src/main/res/drawable/list_item_background.xml b/app/src/main/res/drawable/list_item_background.xml index 6a69bcda..f86d4df1 100644 --- a/app/src/main/res/drawable/list_item_background.xml +++ b/app/src/main/res/drawable/list_item_background.xml @@ -3,10 +3,14 @@ xmlns:app="http://schemas.android.com/apk/res-auto"> <item> <selector> - <item app:state_multiselected="true" android:state_activated="true"> + <item + android:state_activated="true" + app:state_multiselected="true"> <color android:color="?attr/colorControlActivated" /> </item> - <item app:state_multiselected="false" android:state_activated="true"> + <item + android:state_activated="true" + app:state_multiselected="false"> <color android:color="?attr/colorControlHighlight" /> </item> </selector> diff --git a/app/src/main/res/layout/app_list_dialog_fragment.xml b/app/src/main/res/layout/app_list_dialog_fragment.xml index 25879b6b..c975778a 100644 --- a/app/src/main/res/layout/app_list_dialog_fragment.xml +++ b/app/src/main/res/layout/app_list_dialog_fragment.xml @@ -20,7 +20,7 @@ <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" - android:minHeight="200dp" > + android:minHeight="200dp"> <ProgressBar android:id="@+id/progress_bar" @@ -28,7 +28,7 @@ android:layout_height="wrap_content" android:layout_gravity="center" android:indeterminate="true" - android:visibility="@{appData.isEmpty() ? View.VISIBLE : View.GONE}"/> + android:visibility="@{appData.isEmpty() ? View.VISIBLE : View.GONE}" /> <android.support.v7.widget.RecyclerView android:id="@+id/app_list" diff --git a/app/src/main/res/layout/app_list_item.xml b/app/src/main/res/layout/app_list_item.xml index 4519a3a4..825b828b 100644 --- a/app/src/main/res/layout/app_list_item.xml +++ b/app/src/main/res/layout/app_list_item.xml @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<layout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto"> +<layout xmlns:android="http://schemas.android.com/apk/res/android"> <data> @@ -23,10 +22,10 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/list_item_background" - android:padding="16dp" - android:orientation="horizontal" android:gravity="center_vertical" - android:onClick="@{(view) -> item.setExcludedFromTunnel(!item.excludedFromTunnel)}"> + android:onClick="@{(view) -> item.setExcludedFromTunnel(!item.excludedFromTunnel)}" + android:orientation="horizontal" + android:padding="16dp"> <ImageView android:id="@+id/app_icon" diff --git a/app/src/main/res/layout/config_naming_dialog_fragment.xml b/app/src/main/res/layout/config_naming_dialog_fragment.xml index 12871a85..bf8b4267 100644 --- a/app/src/main/res/layout/config_naming_dialog_fragment.xml +++ b/app/src/main/res/layout/config_naming_dialog_fragment.xml @@ -3,6 +3,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto"> <data> + <import type="com.wireguard.android.widget.NameInputFilter" /> </data> diff --git a/app/src/main/res/layout/tunnel_editor_fragment.xml b/app/src/main/res/layout/tunnel_editor_fragment.xml index 1020e34c..f7976459 100644 --- a/app/src/main/res/layout/tunnel_editor_fragment.xml +++ b/app/src/main/res/layout/tunnel_editor_fragment.xml @@ -100,8 +100,8 @@ app:filter="@{KeyInputFilter.newInstance()}" /> <Button - style="@style/Widget.AppCompat.Button.Borderless.Colored" android:id="@+id/generate_private_key_button" + style="@style/Widget.AppCompat.Button.Borderless.Colored" android:layout_width="96dp" android:layout_height="wrap_content" android:layout_alignBottom="@id/private_key_text" @@ -217,12 +217,12 @@ android:textAlignment="center" /> <Button - style="@style/Widget.AppCompat.Button.Borderless.Colored" android:id="@+id/set_excluded_applications" + style="@style/Widget.AppCompat.Button.Borderless.Colored" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="-8dp" android:layout_below="@+id/dns_servers_text" + android:layout_marginLeft="-8dp" android:onClick="@{fragment::onRequestSetExcludedApplications}" android:text="@{@plurals/set_excluded_applications(config.interfaceSection.excludedApplicationsCount, config.interfaceSection.excludedApplicationsCount)}" /> </RelativeLayout> diff --git a/app/src/main/res/layout/tunnel_editor_peer.xml b/app/src/main/res/layout/tunnel_editor_peer.xml index 472b4cac..e270b71a 100644 --- a/app/src/main/res/layout/tunnel_editor_peer.xml +++ b/app/src/main/res/layout/tunnel_editor_peer.xml @@ -4,7 +4,8 @@ <data> - <import type="android.view.View"/> + <import type="android.view.View" /> + <import type="com.wireguard.android.widget.KeyInputFilter" /> <variable diff --git a/app/src/main/res/layout/tunnel_list_fragment.xml b/app/src/main/res/layout/tunnel_list_fragment.xml index a442c3be..ccc1c5ae 100644 --- a/app/src/main/res/layout/tunnel_list_fragment.xml +++ b/app/src/main/res/layout/tunnel_list_fragment.xml @@ -30,65 +30,67 @@ android:id="@+id/tunnel_list" android:layout_width="match_parent" android:layout_height="match_parent" - android:paddingBottom="@{@dimen/design_fab_size_normal * 1.1f}" - android:clipToPadding="false" android:choiceMode="multipleChoiceModal" + android:clipToPadding="false" + android:paddingBottom="@{@dimen/design_fab_size_normal * 1.1f}" android:visibility="@{tunnels.size() > 0 ? android.view.View.VISIBLE : android.view.View.GONE}" + app:configurationHandler="@{rowConfigurationHandler}" app:items="@{tunnels}" - app:layout="@{@layout/tunnel_list_item}" - app:configurationHandler="@{rowConfigurationHandler}" /> + app:layout="@{@layout/tunnel_list_item}" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_gravity="center" android:orientation="vertical" - android:visibility="@{tunnels.size() == 0 ? android.view.View.VISIBLE : android.view.View.GONE}" - android:layout_gravity="center"> + android:visibility="@{tunnels.size() == 0 ? android.view.View.VISIBLE : android.view.View.GONE}"> + <android.support.v7.widget.AppCompatImageView android:id="@+id/logo_placeholder" android:layout_width="140dp" android:layout_height="140dp" android:layout_gravity="center" - android:alpha="0.3333333" - android:layout_marginTop="-70dp" android:layout_marginBottom="20dp" + android:layout_marginTop="-70dp" + android:alpha="0.3333333" android:src="@mipmap/ic_launcher" /> + <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" - android:textSize="20sp" - android:text="@string/tunnel_list_placeholder" /> + android:text="@string/tunnel_list_placeholder" + android:textSize="20sp" /> </LinearLayout> <com.wireguard.android.widget.fab.FloatingActionsMenu android:id="@+id/create_menu" - android:clipChildren="false" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|end" android:layout_margin="@dimen/fab_margin" + android:clipChildren="false" app:fab_labelStyle="@style/fab_label" app:fab_labelsPosition="@integer/label_position" - app:layout_behavior="com.wireguard.android.widget.fab.FloatingActionButtonBehavior" > + app:layout_behavior="com.wireguard.android.widget.fab.FloatingActionButtonBehavior"> <com.wireguard.android.widget.fab.LabeledFloatingActionButton android:id="@+id/create_from_file" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick="@{fragment::onRequestImportConfig}" - app:srcCompat="@drawable/ic_action_open_white" app:fabSize="mini" - app:fab_title="@string/create_from_file" /> + app:fab_title="@string/create_from_file" + app:srcCompat="@drawable/ic_action_open_white" /> <com.wireguard.android.widget.fab.LabeledFloatingActionButton android:id="@+id/scan_qr_code" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick="@{fragment::onRequestScanQRCode}" - app:srcCompat="@drawable/ic_action_scan_qr_code_white" app:fabSize="mini" - app:fab_title="@string/create_from_qrcode" /> + app:fab_title="@string/create_from_qrcode" + app:srcCompat="@drawable/ic_action_scan_qr_code_white" /> <com.wireguard.android.widget.fab.LabeledFloatingActionButton android:id="@+id/create_empty" @@ -96,8 +98,8 @@ android:layout_height="wrap_content" android:onClick="@{fragment::onRequestCreateConfig}" app:fabSize="mini" - app:srcCompat="@drawable/ic_action_edit_white" - app:fab_title="@string/create_empty" /> + app:fab_title="@string/create_empty" + app:srcCompat="@drawable/ic_action_edit_white" /> </com.wireguard.android.widget.fab.FloatingActionsMenu> </android.support.design.widget.CoordinatorLayout> diff --git a/app/src/main/res/menu/main_activity.xml b/app/src/main/res/menu/main_activity.xml index 5fd11821..68bce52e 100644 --- a/app/src/main/res/menu/main_activity.xml +++ b/app/src/main/res/menu/main_activity.xml @@ -5,7 +5,7 @@ android:id="@+id/menu_settings" android:alphabeticShortcut="s" android:icon="@drawable/ic_settings" + android:orderInCategory="1000" android:title="@string/settings" - app:showAsAction="always" - android:orderInCategory="1000" /> + app:showAsAction="always" /> </menu> diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index 85a987f9..86a86e63 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources> <declare-styleable name="Multiselected"> - <attr name="state_multiselected" format="boolean"/> + <attr name="state_multiselected" format="boolean" /> </declare-styleable> -</resources>
\ No newline at end of file +</resources> diff --git a/app/src/main/res/values/fab.xml b/app/src/main/res/values/fab.xml index e1d10df1..8fbdc724 100644 --- a/app/src/main/res/values/fab.xml +++ b/app/src/main/res/values/fab.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <item name="fab_expand_menu_button" type="id"/> - <item name="fab_label" type="id"/> + <item name="fab_expand_menu_button" type="id" /> + <item name="fab_label" type="id" /> <dimen name="fab_shadow_offset">3dp</dimen> <dimen name="fab_shadow_radius">9dp</dimen> @@ -12,19 +12,19 @@ <dimen name="fab_labels_margin">8dp</dimen> <declare-styleable name="LabeledFloatingActionButton"> - <attr name="fab_title" format="string"/> + <attr name="fab_title" format="string" /> </declare-styleable> <declare-styleable name="FloatingActionsMenu"> - <attr name="fab_labelStyle" format="reference"/> + <attr name="fab_labelStyle" format="reference" /> <attr name="fab_labelsPosition" format="enum"> - <enum name="left" value="0"/> - <enum name="right" value="1"/> + <enum name="left" value="0" /> + <enum name="right" value="1" /> </attr> <attr name="fab_expandDirection" format="enum"> - <enum name="up" value="0"/> - <enum name="down" value="1"/> - <enum name="left" value="2"/> - <enum name="right" value="3"/> + <enum name="up" value="0" /> + <enum name="down" value="1" /> + <enum name="left" value="2" /> + <enum name="right" value="3" /> </attr> </declare-styleable> <integer name="label_position">0</integer> diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index c864ecfd..fce295ea 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -12,7 +12,7 @@ <CheckBoxPreference android:defaultValue="false" android:key="dark_theme" - android:summaryOn="@string/dark_theme_summary_on" android:summaryOff="@string/dark_theme_summary_off" + android:summaryOn="@string/dark_theme_summary_on" android:title="@string/dark_theme_title" /> </PreferenceScreen> |