diff options
author | Kyle Horimoto <khorimoto@gmail.com> | 2015-09-25 16:24:26 -0700 |
---|---|---|
committer | Kyle Horimoto <khorimoto@gmail.com> | 2015-09-28 14:20:56 -0700 |
commit | 19be66987c2014ff38ff0b051a86319b354eff16 (patch) | |
tree | 6c0f602f568e6d3d9d844d93696b5bd48299f86f /app/src/main/res | |
parent | 5f4f6074c257d4bf4ebbdfa41fc2842baa4d5ddf (diff) | |
download | connectbot-19be66987c2014ff38ff0b051a86319b354eff16.tar.gz connectbot-19be66987c2014ff38ff0b051a86319b354eff16.tar.bz2 connectbot-19be66987c2014ff38ff0b051a86319b354eff16.zip |
Add FAB to port forward activity.
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/layout/act_portforwardlist.xml | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/app/src/main/res/layout/act_portforwardlist.xml b/app/src/main/res/layout/act_portforwardlist.xml index a11bb1b..b1655e0 100644 --- a/app/src/main/res/layout/act_portforwardlist.xml +++ b/app/src/main/res/layout/act_portforwardlist.xml @@ -18,25 +18,33 @@ */ --> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > + <!-- paddingBottom is calculated with FloatingActionButton's height (56dp) and + margins (16dp): 56dp + (2 x 16dp) = 88dp. --> <android.support.v7.widget.RecyclerView android:id="@+id/list" android:layout_width="fill_parent" - android:layout_height="0dip" - android:layout_weight="1" - /> - - <TextView - android:id="@+id/empty" - android:layout_width="fill_parent" android:layout_height="fill_parent" - android:gravity="center" - android:text="@string/portforward_list_empty" - android:textAppearance="?android:attr/textAppearanceMedium" + android:paddingBottom="88dp" + android:clipToPadding="false" /> -</LinearLayout> + + <android.support.design.widget.FloatingActionButton + android:id="@+id/add_port_forward_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:layout_alignParentEnd="true" + android:layout_alignParentRight="true" + android:layout_margin="16dp" + android:src="@drawable/ic_add" + app:backgroundTint="@color/accent" + app:rippleColor="@color/dark_accent" /> + +</RelativeLayout> |