Layouts in differing configurations must agree on their root tags, so we give both copies of main_activity the same root ID, and adjust the check for two-pane layout to simply test for nullability. This also changes the inset dispatch code to use ViewCompat and WindowInsetsCompat since they will adjust insets based on the SDK level allowing us to abstract away that concern. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
34 lines
1.3 KiB
XML
34 lines
1.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
android:id="@+id/main_activity_container"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
tools:context=".activity.MainActivity">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/master_detail_wrapper"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:baselineAligned="false"
|
|
android:divider="?attr/dividerHorizontal"
|
|
android:orientation="horizontal"
|
|
android:showDividers="middle">
|
|
|
|
<androidx.fragment.app.FragmentContainerView
|
|
android:id="@+id/list_fragment"
|
|
android:name="com.wireguard.android.fragment.TunnelListFragment"
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="2"
|
|
android:tag="LIST" />
|
|
|
|
<androidx.fragment.app.FragmentContainerView
|
|
android:id="@+id/detail_container"
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="3" />
|
|
</LinearLayout>
|
|
|
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|