summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/res/layout
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r--app/src/main/res/layout/app_list_dialog_fragment.xml10
-rw-r--r--app/src/main/res/layout/app_list_item.xml12
-rw-r--r--app/src/main/res/layout/tunnel_detail_fragment.xml4
-rw-r--r--app/src/main/res/layout/tunnel_detail_peer.xml2
-rw-r--r--app/src/main/res/layout/tunnel_editor_fragment.xml6
-rw-r--r--app/src/main/res/layout/tunnel_editor_peer.xml2
-rw-r--r--app/src/main/res/layout/tunnel_list_fragment.xml13
-rw-r--r--app/src/main/res/layout/tunnel_list_item.xml9
8 files changed, 36 insertions, 22 deletions
diff --git a/app/src/main/res/layout/app_list_dialog_fragment.xml b/app/src/main/res/layout/app_list_dialog_fragment.xml
index 50e795d5..c91161e6 100644
--- a/app/src/main/res/layout/app_list_dialog_fragment.xml
+++ b/app/src/main/res/layout/app_list_dialog_fragment.xml
@@ -1,6 +1,7 @@
<?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">
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools">
<data>
@@ -28,14 +29,17 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:indeterminate="true"
- android:visibility="@{appData.isEmpty() ? View.VISIBLE : View.GONE}" />
+ android:visibility="@{appData.isEmpty() ? View.VISIBLE : View.GONE}"
+ tools:visibility="gone" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/app_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:items="@{appData}"
- app:layout="@{@layout/app_list_item}" />
+ app:layout="@{@layout/app_list_item}"
+ tools:itemCount="10"
+ tools:listitem="@layout/app_list_item" />
</FrameLayout>
diff --git a/app/src/main/res/layout/app_list_item.xml b/app/src/main/res/layout/app_list_item.xml
index 825b828b..382f2e82 100644
--- a/app/src/main/res/layout/app_list_item.xml
+++ b/app/src/main/res/layout/app_list_item.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:android="http://schemas.android.com/apk/res/android">
+<layout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools">
<data>
@@ -31,7 +32,8 @@
android:id="@+id/app_icon"
android:layout_width="32dp"
android:layout_height="32dp"
- android:src="@{item.icon}" />
+ android:src="@{item.icon}"
+ tools:src="@tools:sample/avatars" />
<TextView
android:id="@+id/app_name"
@@ -43,13 +45,15 @@
android:maxLines="1"
android:paddingEnd="8dp"
android:paddingStart="8dp"
- android:text="@{key}" />
+ android:text="@{key}"
+ tools:text="@tools:sample/full_names" />
<CheckBox
android:id="@+id/excluded_checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:checked="@={item.excludedFromTunnel}" />
+ android:checked="@={item.excludedFromTunnel}"
+ tools:checked="true" />
</LinearLayout>
</layout>
diff --git a/app/src/main/res/layout/tunnel_detail_fragment.xml b/app/src/main/res/layout/tunnel_detail_fragment.xml
index 23056ecf..40a79eb7 100644
--- a/app/src/main/res/layout/tunnel_detail_fragment.xml
+++ b/app/src/main/res/layout/tunnel_detail_fragment.xml
@@ -25,7 +25,7 @@
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="?android:attr/colorBackground">
+ android:background="?attr/colorBackground">
<LinearLayout
android:layout_width="match_parent"
@@ -39,7 +39,7 @@
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
- android:background="?android:attr/colorBackground"
+ android:background="?attr/colorBackground"
app:cardCornerRadius="4dp"
app:cardElevation="2dp"
app:contentPadding="8dp">
diff --git a/app/src/main/res/layout/tunnel_detail_peer.xml b/app/src/main/res/layout/tunnel_detail_peer.xml
index 0f7ae336..181a4a21 100644
--- a/app/src/main/res/layout/tunnel_detail_peer.xml
+++ b/app/src/main/res/layout/tunnel_detail_peer.xml
@@ -18,7 +18,7 @@
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="4dp"
- android:background="?android:attr/colorBackground"
+ android:background="?attr/colorBackground"
app:cardCornerRadius="4dp"
app:cardElevation="2dp"
app:contentPadding="8dp">
diff --git a/app/src/main/res/layout/tunnel_editor_fragment.xml b/app/src/main/res/layout/tunnel_editor_fragment.xml
index db91df2b..887b3bb7 100644
--- a/app/src/main/res/layout/tunnel_editor_fragment.xml
+++ b/app/src/main/res/layout/tunnel_editor_fragment.xml
@@ -28,7 +28,7 @@
android:id="@+id/main_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="?android:attr/colorBackground">
+ android:background="?attr/colorBackground">
<ScrollView
android:layout_width="match_parent"
@@ -46,7 +46,7 @@
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
- android:background="?android:attr/colorBackground"
+ android:background="?attr/colorBackground"
app:cardCornerRadius="4dp"
app:cardElevation="2dp"
app:contentPadding="8dp">
@@ -104,7 +104,7 @@
<Button
android:id="@+id/generate_private_key_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
- android:layout_width="96dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/private_key_text"
android:layout_alignParentEnd="true"
diff --git a/app/src/main/res/layout/tunnel_editor_peer.xml b/app/src/main/res/layout/tunnel_editor_peer.xml
index 175c174e..cf5d6286 100644
--- a/app/src/main/res/layout/tunnel_editor_peer.xml
+++ b/app/src/main/res/layout/tunnel_editor_peer.xml
@@ -24,7 +24,7 @@
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="4dp"
- android:background="?android:attr/colorBackground"
+ android:background="?attr/colorBackground"
app:cardCornerRadius="4dp"
app:cardElevation="2dp"
app:contentPadding="8dp">
diff --git a/app/src/main/res/layout/tunnel_list_fragment.xml b/app/src/main/res/layout/tunnel_list_fragment.xml
index 3a7c1c7a..4189fa5f 100644
--- a/app/src/main/res/layout/tunnel_list_fragment.xml
+++ b/app/src/main/res/layout/tunnel_list_fragment.xml
@@ -1,6 +1,7 @@
<?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">
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools">
<data>
@@ -23,7 +24,7 @@
android:id="@+id/main_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="?android:attr/colorBackground"
+ android:background="?attr/colorBackground"
android:clipChildren="false">
<androidx.recyclerview.widget.RecyclerView
@@ -36,14 +37,17 @@
android:visibility="@{tunnels.size() > 0 ? android.view.View.VISIBLE : android.view.View.GONE}"
app:configurationHandler="@{rowConfigurationHandler}"
app:items="@{tunnels}"
- app:layout="@{@layout/tunnel_list_item}" />
+ app:layout="@{@layout/tunnel_list_item}"
+ tools:listitem="@layout/tunnel_list_item"
+ tools:itemCount="12" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical"
- android:visibility="@{tunnels.size() == 0 ? android.view.View.VISIBLE : android.view.View.GONE}">
+ android:visibility="@{tunnels.size() == 0 ? android.view.View.VISIBLE : android.view.View.GONE}"
+ tools:visibility="gone">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/logo_placeholder"
@@ -51,7 +55,6 @@
android:layout_height="140dp"
android:layout_gravity="center"
android:layout_marginBottom="20dp"
- android:layout_marginTop="-70dp"
android:alpha="0.3333333"
android:src="@mipmap/ic_launcher" />
diff --git a/app/src/main/res/layout/tunnel_list_item.xml b/app/src/main/res/layout/tunnel_list_item.xml
index 13e14fed..1cca9453 100644
--- a/app/src/main/res/layout/tunnel_list_item.xml
+++ b/app/src/main/res/layout/tunnel_list_item.xml
@@ -1,6 +1,7 @@
<?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">
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools">
<data>
@@ -44,7 +45,8 @@
android:layout_alignParentTop="true"
android:ellipsize="end"
android:maxLines="1"
- android:text="@{key}" />
+ android:text="@{key}"
+ tools:text="@sample/interface_names.json/names/names/name" />
<com.wireguard.android.widget.ToggleSwitch
android:id="@+id/tunnel_switch"
@@ -54,6 +56,7 @@
android:layout_alignParentEnd="true"
android:nextFocusLeft="@+id/tunnel_list_item"
app:checked="@{item.state == State.UP}"
- app:onBeforeCheckedChanged="@{fragment::setTunnelState}" />
+ app:onBeforeCheckedChanged="@{fragment::setTunnelState}"
+ tools:checked="@sample/interface_names.json/names/checked/checked" />
</com.wireguard.android.widget.MultiselectableRelativeLayout>
</layout>