diff options
author | Eric Kuck <eric@bluelinelabs.com> | 2018-07-11 12:48:18 -0500 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-07-11 21:03:22 +0200 |
commit | 5463086e7533f647e4a29a964d4b54a4e79ddca1 (patch) | |
tree | 9bd0a78e4940d15f371e0cca9d7a827e2ba9bf6c /app/src/main/res | |
parent | 1f7bdd4f5f9fadb51f6c61c453f51533e4886dfa (diff) |
fab: use support library's rendering
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/drawable-hdpi/fab_bg_mini.png | bin | 3519 -> 0 bytes | |||
-rw-r--r-- | app/src/main/res/drawable-hdpi/fab_bg_normal.png | bin | 4925 -> 0 bytes | |||
-rw-r--r-- | app/src/main/res/drawable-mdpi/fab_bg_mini.png | bin | 1547 -> 0 bytes | |||
-rw-r--r-- | app/src/main/res/drawable-mdpi/fab_bg_normal.png | bin | 2956 -> 0 bytes | |||
-rw-r--r-- | app/src/main/res/drawable-xhdpi/fab_bg_mini.png | bin | 4963 -> 0 bytes | |||
-rw-r--r-- | app/src/main/res/drawable-xhdpi/fab_bg_normal.png | bin | 7139 -> 0 bytes | |||
-rw-r--r-- | app/src/main/res/drawable-xxhdpi/fab_bg_mini.png | bin | 4803 -> 0 bytes | |||
-rw-r--r-- | app/src/main/res/drawable-xxhdpi/fab_bg_normal.png | bin | 6114 -> 0 bytes | |||
-rw-r--r-- | app/src/main/res/drawable-xxxhdpi/fab_bg_mini.png | bin | 5987 -> 0 bytes | |||
-rw-r--r-- | app/src/main/res/drawable-xxxhdpi/fab_bg_normal.png | bin | 8005 -> 0 bytes | |||
-rw-r--r-- | app/src/main/res/drawable/ic_action_add_inverse.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/layout/tunnel_list_fragment.xml | 21 | ||||
-rw-r--r-- | app/src/main/res/values/fab.xml | 32 |
13 files changed, 22 insertions, 40 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 Binary files differdeleted file mode 100644 index 4b48351c..00000000 --- a/app/src/main/res/drawable-hdpi/fab_bg_mini.png +++ /dev/null diff --git a/app/src/main/res/drawable-hdpi/fab_bg_normal.png b/app/src/main/res/drawable-hdpi/fab_bg_normal.png Binary files differdeleted file mode 100644 index 4daec66d..00000000 --- a/app/src/main/res/drawable-hdpi/fab_bg_normal.png +++ /dev/null diff --git a/app/src/main/res/drawable-mdpi/fab_bg_mini.png b/app/src/main/res/drawable-mdpi/fab_bg_mini.png Binary files differdeleted file mode 100644 index 218cf044..00000000 --- a/app/src/main/res/drawable-mdpi/fab_bg_mini.png +++ /dev/null diff --git a/app/src/main/res/drawable-mdpi/fab_bg_normal.png b/app/src/main/res/drawable-mdpi/fab_bg_normal.png Binary files differdeleted file mode 100644 index c157df36..00000000 --- a/app/src/main/res/drawable-mdpi/fab_bg_normal.png +++ /dev/null diff --git a/app/src/main/res/drawable-xhdpi/fab_bg_mini.png b/app/src/main/res/drawable-xhdpi/fab_bg_mini.png Binary files differdeleted file mode 100644 index d56bfe82..00000000 --- a/app/src/main/res/drawable-xhdpi/fab_bg_mini.png +++ /dev/null diff --git a/app/src/main/res/drawable-xhdpi/fab_bg_normal.png b/app/src/main/res/drawable-xhdpi/fab_bg_normal.png Binary files differdeleted file mode 100644 index 41614b93..00000000 --- a/app/src/main/res/drawable-xhdpi/fab_bg_normal.png +++ /dev/null diff --git a/app/src/main/res/drawable-xxhdpi/fab_bg_mini.png b/app/src/main/res/drawable-xxhdpi/fab_bg_mini.png Binary files differdeleted file mode 100644 index 1cdd2b1d..00000000 --- a/app/src/main/res/drawable-xxhdpi/fab_bg_mini.png +++ /dev/null diff --git a/app/src/main/res/drawable-xxhdpi/fab_bg_normal.png b/app/src/main/res/drawable-xxhdpi/fab_bg_normal.png Binary files differdeleted file mode 100644 index 14608fff..00000000 --- a/app/src/main/res/drawable-xxhdpi/fab_bg_normal.png +++ /dev/null diff --git a/app/src/main/res/drawable-xxxhdpi/fab_bg_mini.png b/app/src/main/res/drawable-xxxhdpi/fab_bg_mini.png Binary files differdeleted file mode 100644 index 6fea6746..00000000 --- a/app/src/main/res/drawable-xxxhdpi/fab_bg_mini.png +++ /dev/null diff --git a/app/src/main/res/drawable-xxxhdpi/fab_bg_normal.png b/app/src/main/res/drawable-xxxhdpi/fab_bg_normal.png Binary files differdeleted file mode 100644 index 0e78ff60..00000000 --- a/app/src/main/res/drawable-xxxhdpi/fab_bg_normal.png +++ /dev/null diff --git a/app/src/main/res/drawable/ic_action_add_inverse.xml b/app/src/main/res/drawable/ic_action_add_inverse.xml new file mode 100644 index 00000000..571e70e7 --- /dev/null +++ b/app/src/main/res/drawable/ic_action_add_inverse.xml @@ -0,0 +1,9 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportHeight="24.0" + android:viewportWidth="24.0"> + <path + android:fillColor="?android:attr/colorBackground" + android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" /> +</vector> diff --git a/app/src/main/res/layout/tunnel_list_fragment.xml b/app/src/main/res/layout/tunnel_list_fragment.xml index cad2e094..5aff4739 100644 --- a/app/src/main/res/layout/tunnel_list_fragment.xml +++ b/app/src/main/res/layout/tunnel_list_fragment.xml @@ -23,7 +23,8 @@ android:id="@+id/main_container" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="?android:attr/colorBackground"> + android:background="?android:attr/colorBackground" + android:clipChildren="false"> <android.support.v7.widget.RecyclerView android:id="@+id/tunnel_list" @@ -39,27 +40,27 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|end" - android:layout_margin="8dp" + android:layout_margin="16dp" app:fab_labelStyle="@style/fab_label" - app:fab_labelsPosition="left" - app:layout_dodgeInsetEdges="bottom"> + android:clipChildren="false" + app:fab_labelsPosition="left" > - <com.wireguard.android.widget.fab.FloatingActionButton + <com.wireguard.android.widget.fab.LabeledFloatingActionButton android:id="@+id/create_empty" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick="@{fragment::onRequestCreateConfig}" - app:fab_icon="@drawable/ic_action_edit_inverse" - app:fab_size="mini" + app:fabSize="mini" + app:srcCompat="@drawable/ic_action_edit_inverse" app:fab_title="@string/create_empty" /> - <com.wireguard.android.widget.fab.FloatingActionButton + <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:fab_icon="@drawable/ic_action_open_inverse" - app:fab_size="mini" + app:srcCompat="@drawable/ic_action_open_inverse" + app:fabSize="mini" app:fab_title="@string/create_from_file" /> </com.wireguard.android.widget.fab.FloatingActionsMenu> </android.support.design.widget.CoordinatorLayout> diff --git a/app/src/main/res/values/fab.xml b/app/src/main/res/values/fab.xml index e2931595..0f373333 100644 --- a/app/src/main/res/values/fab.xml +++ b/app/src/main/res/values/fab.xml @@ -3,46 +3,18 @@ <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_actions_spacing">24dp</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> + <declare-styleable name="LabeledFloatingActionButton"> <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"/> |