diff options
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/config_naming_dialog_fragment.xml | 25 | ||||
-rw-r--r-- | app/src/main/res/layout/tunnel_list_fragment.xml | 52 |
2 files changed, 56 insertions, 21 deletions
diff --git a/app/src/main/res/layout/config_naming_dialog_fragment.xml b/app/src/main/res/layout/config_naming_dialog_fragment.xml new file mode 100644 index 00000000..aae78049 --- /dev/null +++ b/app/src/main/res/layout/config_naming_dialog_fragment.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<layout xmlns:android="http://schemas.android.com/apk/res/android"> + + <FrameLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:padding="16dp"> + + <android.support.design.widget.TextInputLayout + android:id="@+id/tunnel_name_text_layout" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <EditText + android:id="@+id/tunnel_name_text" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:hint="@string/tunnel_name" /> + + </android.support.design.widget.TextInputLayout> + + </FrameLayout> + + +</layout> diff --git a/app/src/main/res/layout/tunnel_list_fragment.xml b/app/src/main/res/layout/tunnel_list_fragment.xml index 48293133..2a7de392 100644 --- a/app/src/main/res/layout/tunnel_list_fragment.xml +++ b/app/src/main/res/layout/tunnel_list_fragment.xml @@ -38,6 +38,29 @@ app:layout="@{@layout/tunnel_list_item}" app:configurationHandler="@{rowConfigurationHandler}" /> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:visibility="@{tunnels.size() == 0 ? android.view.View.VISIBLE : android.view.View.GONE}" + android:layout_gravity="center"> + <android.support.v7.widget.AppCompatImageView + android:id="@+id/logo_placeholder" + android:layout_width="140dp" + android:layout_height="140dp" + android:layout_gravity="center" + android:tint="@color/transparent_background_placeholder" + android:layout_marginTop="-70dp" + android:layout_marginBottom="20dp" + android:src="@mipmap/ic_launcher" /> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:textSize="20sp" + android:text="@string/tunnel_list_placeholder" /> + </LinearLayout> + <com.wireguard.android.widget.fab.FloatingActionsMenu android:id="@+id/create_menu" android:clipChildren="false" @@ -66,29 +89,16 @@ app:srcCompat="@drawable/ic_action_open_white" app:fabSize="mini" app:fab_title="@string/create_from_file" /> - </com.wireguard.android.widget.fab.FloatingActionsMenu> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical" - android:visibility="@{tunnels.size() == 0 ? android.view.View.VISIBLE : android.view.View.GONE}" - android:layout_gravity="center"> - <android.support.v7.widget.AppCompatImageView - android:id="@+id/logo_placeholder" - android:layout_width="140dp" - android:layout_height="140dp" - android:layout_gravity="center" - android:tint="@color/transparent_background_placeholder" - android:layout_marginTop="-70dp" - android:layout_marginBottom="20dp" - android:src="@mipmap/ic_launcher" /> - <TextView + <com.wireguard.android.widget.fab.LabeledFloatingActionButton + android:id="@+id/scan_qr_code" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_gravity="center" - android:textSize="20sp" - android:text="@string/tunnel_list_placeholder" /> - </LinearLayout> + android:onClick="@{fragment::onRequestScanQRCode}" + app:srcCompat="@drawable/ic_action_scan_qr_code_white" + app:fabSize="mini" + app:fab_title="@string/scan_qr_code" /> + </com.wireguard.android.widget.fab.FloatingActionsMenu> + </android.support.design.widget.CoordinatorLayout> </layout> |