diff options
author | Samuel Holland <samuel@sholland.org> | 2017-11-28 20:14:47 -0600 |
---|---|---|
committer | Samuel Holland <samuel@sholland.org> | 2017-11-28 20:14:47 -0600 |
commit | 4a672fc05d4b40b2e169bdf7b6212f86c3789de0 (patch) | |
tree | 132e6a235a61b8f816223eacc9983b5a0be947d6 /app/src/main/res/layout | |
parent | 19f008955963015abbaf0c9fd88492d0eb0a6ace (diff) |
ConfigListFragment: Use a floating action menu
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/config_list_fragment.xml | 46 |
1 files changed, 40 insertions, 6 deletions
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>" /> </data> - <ListView - android:id="@+id/config_list" + <RelativeLayout android:layout_width="match_parent" - android:layout_height="match_parent" - android:choiceMode="singleChoice" - app:items="@{configs}" - app:layout="@{@layout/config_list_item}" /> + android:layout_height="match_parent"> + + <ListView + android:id="@+id/config_list" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:choiceMode="singleChoice" + app:items="@{configs}" + app:layout="@{@layout/config_list_item}" /> + + <com.getbase.floatingactionbutton.FloatingActionsMenu + android:id="@+id/add_menu" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:layout_alignParentEnd="true" + android:layout_marginBottom="8dp" + android:layout_marginEnd="8dp" + app:fab_labelStyle="@style/fab_label" + app:fab_labelsPosition="left"> + + <com.getbase.floatingactionbutton.FloatingActionButton + android:id="@+id/add_from_file" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:fab_icon="@drawable/ic_action_save" + app:fab_size="mini" + app:fab_title="@string/add_from_file" /> + + <com.getbase.floatingactionbutton.FloatingActionButton + android:id="@+id/add_from_scratch" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:fab_icon="@drawable/ic_action_edit" + app:fab_size="mini" + app:fab_title="@string/add_from_scratch" /> + </com.getbase.floatingactionbutton.FloatingActionsMenu> + + </RelativeLayout> </layout> |