diff options
author | Samuel Holland <samuel@sholland.org> | 2018-01-01 02:06:37 -0600 |
---|---|---|
committer | Samuel Holland <samuel@sholland.org> | 2018-01-06 04:09:29 -0600 |
commit | 609194fae2332e6f2ccd7a4464bfa492ad661a6f (patch) | |
tree | 96a7cd9846a093dfcdacfef285b0a4d77000edf0 /app/src/main/res/layout/tunnel_list_fragment.xml | |
parent | Rename package widgets -> widget (diff) | |
download | wireguard-android-609194fae2332e6f2ccd7a4464bfa492ad661a6f.tar.xz wireguard-android-609194fae2332e6f2ccd7a4464bfa492ad661a6f.zip |
Serviceless rewrite, part 1
Signed-off-by: Samuel Holland <samuel@sholland.org>
Diffstat (limited to 'app/src/main/res/layout/tunnel_list_fragment.xml')
-rw-r--r-- | app/src/main/res/layout/tunnel_list_fragment.xml | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/app/src/main/res/layout/tunnel_list_fragment.xml b/app/src/main/res/layout/tunnel_list_fragment.xml new file mode 100644 index 00000000..e4923d54 --- /dev/null +++ b/app/src/main/res/layout/tunnel_list_fragment.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="utf-8"?> +<layout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto"> + + <data> + + <variable + name="fragment" + type="com.wireguard.android.fragment.TunnelListFragment" /> + + <variable + name="tunnels" + type="com.wireguard.android.model.TunnelCollection" /> + </data> + + <com.commonsware.cwac.crossport.design.widget.CoordinatorLayout + android:id="@+id/main_container" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="?android:attr/colorBackground"> + + <ListView + android:id="@+id/tunnel_list" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:choiceMode="multipleChoiceModal" + app:items="@{tunnels}" + app:layout="@{@layout/tunnel_list_item}" /> + + <com.getbase.floatingactionbutton.FloatingActionsMenu + android:id="@+id/create_menu" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="bottom|end" + android:layout_margin="8dp" + app:fab_labelStyle="@style/fab_label" + app:fab_labelsPosition="left" + app:layout_dodgeInsetEdges="bottom"> + + <com.getbase.floatingactionbutton.FloatingActionButton + 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" + app:fab_size="mini" + app:fab_title="@string/create_empty" /> + + <com.getbase.floatingactionbutton.FloatingActionButton + 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" + app:fab_size="mini" + app:fab_title="@string/create_from_file" /> + </com.getbase.floatingactionbutton.FloatingActionsMenu> + </com.commonsware.cwac.crossport.design.widget.CoordinatorLayout> +</layout> |