diff options
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/profile_list_activity.xml | 17 | ||||
-rw-r--r-- | app/src/main/res/layout/profile_list_item.xml | 29 |
2 files changed, 46 insertions, 0 deletions
diff --git a/app/src/main/res/layout/profile_list_activity.xml b/app/src/main/res/layout/profile_list_activity.xml new file mode 100644 index 00000000..4e7b251f --- /dev/null +++ b/app/src/main/res/layout/profile_list_activity.xml @@ -0,0 +1,17 @@ +<?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="profiles" + type="android.databinding.ObservableList<com.wireguard.config.Profile>" /> + </data> + + <ListView + android:layout_width="match_parent" + android:layout_height="match_parent" + app:items="@{profiles}" + app:layout="@{@layout/profile_list_item}" /> +</layout> diff --git a/app/src/main/res/layout/profile_list_item.xml b/app/src/main/res/layout/profile_list_item.xml new file mode 100644 index 00000000..aeafaf0f --- /dev/null +++ b/app/src/main/res/layout/profile_list_item.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<layout xmlns:android="http://schemas.android.com/apk/res/android"> + + <data> + + <variable + name="item" + type="com.wireguard.config.Profile" /> + </data> + + <RelativeLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="16dp"> + + <TextView + android:id="@+id/profile_name" + style="?android:attr/textAppearanceMedium" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@{item.name}" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_below="@+id/profile_name" + android:text="@{item.toString()}" /> + </RelativeLayout> +</layout> |