summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/res
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-05-29 18:37:14 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-05-29 19:03:47 +0200
commit09833a1ba51ca01680b9929410bc70218d985eb4 (patch)
tree1b204c71a221bfa9a3aa1b5ec2a0a4518d2e87e3 /app/src/main/res
parentded0191aae5bfe14409f343c0e3ce3b5db47261a (diff)
FloatingActionButton: import cleaned up getbase code
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/drawable-hdpi/fab_bg_mini.pngbin0 -> 3519 bytes
-rw-r--r--app/src/main/res/drawable-hdpi/fab_bg_normal.pngbin0 -> 4925 bytes
-rw-r--r--app/src/main/res/drawable-mdpi/fab_bg_mini.pngbin0 -> 1547 bytes
-rw-r--r--app/src/main/res/drawable-mdpi/fab_bg_normal.pngbin0 -> 2956 bytes
-rw-r--r--app/src/main/res/drawable-xhdpi/fab_bg_mini.pngbin0 -> 4963 bytes
-rw-r--r--app/src/main/res/drawable-xhdpi/fab_bg_normal.pngbin0 -> 7139 bytes
-rw-r--r--app/src/main/res/drawable-xxhdpi/fab_bg_mini.pngbin0 -> 4803 bytes
-rw-r--r--app/src/main/res/drawable-xxhdpi/fab_bg_normal.pngbin0 -> 6114 bytes
-rw-r--r--app/src/main/res/drawable-xxxhdpi/fab_bg_mini.pngbin0 -> 5987 bytes
-rw-r--r--app/src/main/res/drawable-xxxhdpi/fab_bg_normal.pngbin0 -> 8005 bytes
-rw-r--r--app/src/main/res/layout/tunnel_list_fragment.xml8
-rw-r--r--app/src/main/res/values/fab.xml58
12 files changed, 62 insertions, 4 deletions
diff --git a/app/src/main/res/drawable-hdpi/fab_bg_mini.png b/app/src/main/res/drawable-hdpi/fab_bg_mini.png
new file mode 100644
index 00000000..4b48351c
--- /dev/null
+++ b/app/src/main/res/drawable-hdpi/fab_bg_mini.png
Binary files differ
diff --git a/app/src/main/res/drawable-hdpi/fab_bg_normal.png b/app/src/main/res/drawable-hdpi/fab_bg_normal.png
new file mode 100644
index 00000000..4daec66d
--- /dev/null
+++ b/app/src/main/res/drawable-hdpi/fab_bg_normal.png
Binary files differ
diff --git a/app/src/main/res/drawable-mdpi/fab_bg_mini.png b/app/src/main/res/drawable-mdpi/fab_bg_mini.png
new file mode 100644
index 00000000..218cf044
--- /dev/null
+++ b/app/src/main/res/drawable-mdpi/fab_bg_mini.png
Binary files differ
diff --git a/app/src/main/res/drawable-mdpi/fab_bg_normal.png b/app/src/main/res/drawable-mdpi/fab_bg_normal.png
new file mode 100644
index 00000000..c157df36
--- /dev/null
+++ b/app/src/main/res/drawable-mdpi/fab_bg_normal.png
Binary files differ
diff --git a/app/src/main/res/drawable-xhdpi/fab_bg_mini.png b/app/src/main/res/drawable-xhdpi/fab_bg_mini.png
new file mode 100644
index 00000000..d56bfe82
--- /dev/null
+++ b/app/src/main/res/drawable-xhdpi/fab_bg_mini.png
Binary files differ
diff --git a/app/src/main/res/drawable-xhdpi/fab_bg_normal.png b/app/src/main/res/drawable-xhdpi/fab_bg_normal.png
new file mode 100644
index 00000000..41614b93
--- /dev/null
+++ b/app/src/main/res/drawable-xhdpi/fab_bg_normal.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxhdpi/fab_bg_mini.png b/app/src/main/res/drawable-xxhdpi/fab_bg_mini.png
new file mode 100644
index 00000000..1cdd2b1d
--- /dev/null
+++ b/app/src/main/res/drawable-xxhdpi/fab_bg_mini.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxhdpi/fab_bg_normal.png b/app/src/main/res/drawable-xxhdpi/fab_bg_normal.png
new file mode 100644
index 00000000..14608fff
--- /dev/null
+++ b/app/src/main/res/drawable-xxhdpi/fab_bg_normal.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxxhdpi/fab_bg_mini.png b/app/src/main/res/drawable-xxxhdpi/fab_bg_mini.png
new file mode 100644
index 00000000..6fea6746
--- /dev/null
+++ b/app/src/main/res/drawable-xxxhdpi/fab_bg_mini.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxxhdpi/fab_bg_normal.png b/app/src/main/res/drawable-xxxhdpi/fab_bg_normal.png
new file mode 100644
index 00000000..0e78ff60
--- /dev/null
+++ b/app/src/main/res/drawable-xxxhdpi/fab_bg_normal.png
Binary files differ
diff --git a/app/src/main/res/layout/tunnel_list_fragment.xml b/app/src/main/res/layout/tunnel_list_fragment.xml
index 5d6a5ce9..444b0952 100644
--- a/app/src/main/res/layout/tunnel_list_fragment.xml
+++ b/app/src/main/res/layout/tunnel_list_fragment.xml
@@ -29,7 +29,7 @@
app:items="@{tunnels}"
app:layout="@{@layout/tunnel_list_item}" />
- <com.getbase.floatingactionbutton.FloatingActionsMenu
+ <com.wireguard.android.widget.fab.FloatingActionsMenu
android:id="@+id/create_menu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -39,7 +39,7 @@
app:fab_labelsPosition="left"
app:layout_dodgeInsetEdges="bottom">
- <com.getbase.floatingactionbutton.FloatingActionButton
+ <com.wireguard.android.widget.fab.FloatingActionButton
android:id="@+id/create_empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -48,7 +48,7 @@
app:fab_size="mini"
app:fab_title="@string/create_empty" />
- <com.getbase.floatingactionbutton.FloatingActionButton
+ <com.wireguard.android.widget.fab.FloatingActionButton
android:id="@+id/create_from_file"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -56,6 +56,6 @@
app:fab_icon="@drawable/ic_action_open"
app:fab_size="mini"
app:fab_title="@string/create_from_file" />
- </com.getbase.floatingactionbutton.FloatingActionsMenu>
+ </com.wireguard.android.widget.fab.FloatingActionsMenu>
</android.support.design.widget.CoordinatorLayout>
</layout>
diff --git a/app/src/main/res/values/fab.xml b/app/src/main/res/values/fab.xml
new file mode 100644
index 00000000..e2931595
--- /dev/null
+++ b/app/src/main/res/values/fab.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <item name="fab_expand_menu_button" type="id"/>
+ <item name="fab_label" type="id"/>
+
+ <dimen name="fab_size_normal">56dp</dimen>
+ <dimen name="fab_size_mini">40dp</dimen>
+
+ <dimen name="fab_icon_size">24dp</dimen>
+
+ <dimen name="fab_plus_icon_size">14dp</dimen>
+ <dimen name="fab_plus_icon_stroke">2dp</dimen>
+
+ <dimen name="fab_shadow_offset">3dp</dimen>
+ <dimen name="fab_shadow_radius">9dp</dimen>
+
+ <dimen name="fab_stroke_width">1dp</dimen>
+
+ <dimen name="fab_actions_spacing">16dp</dimen>
+ <dimen name="fab_labels_margin">8dp</dimen>
+
+ <declare-styleable name="FloatingActionButton">
+ <attr name="fab_colorPressed" format="color"/>
+ <attr name="fab_colorDisabled" format="color"/>
+ <attr name="fab_colorNormal" format="color"/>
+ <attr name="fab_icon" format="reference"/>
+ <attr name="fab_size" format="enum">
+ <enum name="normal" value="0"/>
+ <enum name="mini" value="1"/>
+ </attr>
+ <attr name="fab_title" format="string"/>
+ <attr name="fab_stroke_visible" format="boolean"/>
+ </declare-styleable>
+ <declare-styleable name="AddFloatingActionButton">
+ <attr name="fab_plusIconColor" format="color"/>
+ </declare-styleable>
+ <declare-styleable name="FloatingActionsMenu">
+ <attr name="fab_addButtonColorPressed" format="color"/>
+ <attr name="fab_addButtonColorNormal" format="color"/>
+ <attr name="fab_addButtonSize" format="enum">
+ <enum name="normal" value="0"/>
+ <enum name="mini" value="1"/>
+ </attr>
+ <attr name="fab_addButtonPlusIconColor" format="color"/>
+ <attr name="fab_addButtonStrokeVisible" format="boolean"/>
+ <attr name="fab_labelStyle" format="reference"/>
+ <attr name="fab_labelsPosition" format="enum">
+ <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"/>
+ </attr>
+ </declare-styleable>
+</resources>