summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2014-11-26 18:55:55 +0100
committerArne Schwabe <arne@rfc2549.org>2014-11-26 18:55:55 +0100
commit32f18ee02feb0b5af48e2a7ee2267f4c12ced583 (patch)
treea2725b8e59244a3f46855e34cbf6e43f37c06be9
parentace17a3b907c2732932845081c197c1e4e8b8972 (diff)
FABs for main screen
--HG-- extra : rebase_source : 234f8d997878ec418d3587dd7b1e8bcc9e5d20f6
-rw-r--r--main/src/main/res/layout-v21/profile_list_fabs.xml33
-rw-r--r--main/src/main/res/layout/profile_list_fabs.xml7
-rw-r--r--main/src/main/res/layout/vpn_profile_list.xml14
-rw-r--r--main/src/main/res/values/dimens.xml1
4 files changed, 43 insertions, 12 deletions
diff --git a/main/src/main/res/layout-v21/profile_list_fabs.xml b/main/src/main/res/layout-v21/profile_list_fabs.xml
new file mode 100644
index 00000000..11c68348
--- /dev/null
+++ b/main/src/main/res/layout-v21/profile_list_fabs.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (c) 2012-2014 Arne Schwabe
+ ~ Distributed under the GNU GPL v2. For full terms see the file doc/LICENSE.txt
+ -->
+
+<merge xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <ImageButton
+ android:id="@+id/add_button"
+ android:layout_width="@dimen/round_button_diameter"
+ android:layout_height="@dimen/round_button_diameter"
+ android:layout_gravity="end|bottom"
+ android:tint="@android:color/white"
+ android:background="@drawable/oval_ripple"
+ android:elevation="@dimen/elevation_low"
+ android:layout_marginBottom="@dimen/add_button_margin_topfab"
+ android:layout_marginEnd="@dimen/add_button_margin"
+ android:src="@drawable/ic_archive_grey600_24dp" />
+
+ <ImageButton
+ android:id="@+id/import_button"
+ android:layout_width="@dimen/round_button_diameter"
+ android:layout_height="@dimen/round_button_diameter"
+ android:layout_gravity="end|bottom"
+ android:tint="@android:color/white"
+ android:background="@drawable/oval_ripple"
+ android:elevation="@dimen/elevation_low"
+ android:layout_marginBottom="@dimen/add_button_margin"
+ android:layout_marginEnd="@dimen/add_button_margin"
+ android:src="@android:drawable/ic_input_add" />
+
+</merge> \ No newline at end of file
diff --git a/main/src/main/res/layout/profile_list_fabs.xml b/main/src/main/res/layout/profile_list_fabs.xml
new file mode 100644
index 00000000..4ec98330
--- /dev/null
+++ b/main/src/main/res/layout/profile_list_fabs.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (c) 2012-2014 Arne Schwabe
+ ~ Distributed under the GNU GPL v2. For full terms see the file doc/LICENSE.txt
+ -->
+
+<merge /> \ No newline at end of file
diff --git a/main/src/main/res/layout/vpn_profile_list.xml b/main/src/main/res/layout/vpn_profile_list.xml
index 79272f6c..3ea89bdd 100644
--- a/main/src/main/res/layout/vpn_profile_list.xml
+++ b/main/src/main/res/layout/vpn_profile_list.xml
@@ -74,16 +74,6 @@
</LinearLayout>
-<!-- <ImageButton
- android:id="@+id/add_button"
- android:layout_width="@dimen/round_button_diameter"
- android:layout_height="@dimen/round_button_diameter"
- android:layout_gravity="end|bottom"
- android:tint="@android:color/white"
- android:background="@drawable/oval_ripple"
- android:elevation="@dimen/elevation_low"
- android:visibility="gone"
- android:layout_marginBottom="@dimen/add_button_margin"
- android:layout_marginEnd="@dimen/add_button_margin"
- android:src="@drawable/ic_archive_grey600_24dp" /> -->
+ <include layout="@layout/profile_list_fabs" />
+
</FrameLayout>
diff --git a/main/src/main/res/values/dimens.xml b/main/src/main/res/values/dimens.xml
index 0ac55f05..773635cf 100644
--- a/main/src/main/res/values/dimens.xml
+++ b/main/src/main/res/values/dimens.xml
@@ -13,6 +13,7 @@
<dimen name="elevation_low">1dp</dimen>
<dimen name="elevation_high">4dp</dimen>
<dimen name="add_button_margin">16dp</dimen>
+ <dimen name="add_button_margin_topfab">96dp</dimen>
<dimen name="round_button_diameter">56dp</dimen>
<dimen name="switchbar_pad">16dp</dimen>
<dimen name="vpn_setting_padding">16dp</dimen>