From 4a672fc05d4b40b2e169bdf7b6212f86c3789de0 Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Tue, 28 Nov 2017 20:14:47 -0600 Subject: ConfigListFragment: Use a floating action menu Signed-off-by: Jason A. Donenfeld --- app/src/main/res/drawable/fab_label_background.xml | 10 +++++ app/src/main/res/layout/config_list_fragment.xml | 46 +++++++++++++++++++--- app/src/main/res/menu/config_list.xml | 15 ------- app/src/main/res/values/strings.xml | 3 +- app/src/main/res/values/styles.xml | 8 ++++ 5 files changed, 60 insertions(+), 22 deletions(-) create mode 100644 app/src/main/res/drawable/fab_label_background.xml delete mode 100644 app/src/main/res/menu/config_list.xml create mode 100644 app/src/main/res/values/styles.xml (limited to 'app/src/main/res') diff --git a/app/src/main/res/drawable/fab_label_background.xml b/app/src/main/res/drawable/fab_label_background.xml new file mode 100644 index 00000000..c0315fd6 --- /dev/null +++ b/app/src/main/res/drawable/fab_label_background.xml @@ -0,0 +1,10 @@ + + + + + + diff --git a/app/src/main/res/layout/config_list_fragment.xml b/app/src/main/res/layout/config_list_fragment.xml index 7e8304e6..b3c48175 100644 --- a/app/src/main/res/layout/config_list_fragment.xml +++ b/app/src/main/res/layout/config_list_fragment.xml @@ -10,11 +10,45 @@ type="com.wireguard.android.bindings.ObservableSortedMap<String, com.wireguard.config.Config>" /> - + android:layout_height="match_parent"> + + + + + + + + + + + diff --git a/app/src/main/res/menu/config_list.xml b/app/src/main/res/menu/config_list.xml deleted file mode 100644 index 0e94e7ff..00000000 --- a/app/src/main/res/menu/config_list.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 4f548672..4687ec49 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -4,8 +4,9 @@ %d configuration selected %d configurations selected - Add empty config New WireGuard configuration + Add from file + Add from scratch Add peer Addresses Allowed IPs diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml new file mode 100644 index 00000000..11f3e544 --- /dev/null +++ b/app/src/main/res/values/styles.xml @@ -0,0 +1,8 @@ + + + + + + -- cgit v1.2.3