summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/res
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2018-07-28 17:06:39 -0500
committerSamuel Holland <samuel@sholland.org>2018-07-28 17:07:37 -0500
commitca92ac60b755acb7b27a9f74b85d136ac6b45072 (patch)
tree70961ae3ae24d83350318960ea51bb8f01ae0523 /app/src/main/res
parente29c21f8df78b0a855d1fd00fd70c1f429d49954 (diff)
MainActivity: Fix fragment selection logic
Signed-off-by: Samuel Holland <samuel@sholland.org>
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/layout-w600dp/main_activity.xml25
-rw-r--r--app/src/main/res/layout/main_activity.xml16
2 files changed, 39 insertions, 2 deletions
diff --git a/app/src/main/res/layout-w600dp/main_activity.xml b/app/src/main/res/layout-w600dp/main_activity.xml
new file mode 100644
index 00000000..b751c8c1
--- /dev/null
+++ b/app/src/main/res/layout-w600dp/main_activity.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/master_detail_wrapper"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:baselineAligned="false"
+ android:divider="?android:attr/dividerHorizontal"
+ android:orientation="horizontal"
+ android:showDividers="middle"
+ tools:context=".activity.MainActivity">
+
+ <fragment
+ android:name="com.wireguard.android.fragment.TunnelListFragment"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="2"
+ android:tag="LIST" />
+
+ <FrameLayout
+ android:id="@+id/detail_container"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="3" />
+</LinearLayout>
diff --git a/app/src/main/res/layout/main_activity.xml b/app/src/main/res/layout/main_activity.xml
index 0f21e2e8..a4fd7fd1 100644
--- a/app/src/main/res/layout/main_activity.xml
+++ b/app/src/main/res/layout/main_activity.xml
@@ -1,7 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/master_fragment"
+ android:id="@+id/master_detail_wrapper"
android:layout_width="match_parent"
android:layout_height="match_parent"
- tools:ignore="MergeRootFrame" />
+ tools:context=".activity.MainActivity">
+
+ <fragment
+ android:name="com.wireguard.android.fragment.TunnelListFragment"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:tag="LIST" />
+
+ <FrameLayout
+ android:id="@+id/detail_container"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+</FrameLayout>