fab: use support library's rendering
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
@@ -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>
|
||||
@@ -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>
|
||||
|
||||
@@ -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"/>
|
||||
|
||||