Answer the question
In order to leave comments, you need to log in
How to achieve overlapping of part of the content of one fragment with another fragment?
We have: two fragments
1) List fragment
2) Detail fragment
Created and replaced dynamically ..
in the markup:
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/linear_layout_container"
>
<FrameLayout
android:id="@+id/leftFragmentContainer"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight=".4"
/>
<FrameLayout
android:id="@+id/rightFragmentContainer"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight=".6"
/>
</LinearLayout>
Answer the question
In order to leave comments, you need to log in
Maybe so:
<FrameLayout
android:id="@+id/linear_layout_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<FrameLayout
android:id="@+id/leftFragmentContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<FrameLayout
android:id="@+id/rightFragmentContainer"
android:layout_width="match_parent"
android:layout_gravity="top|left"
android:layout_height="match_parent"
android:layout_marginLeft="250dp"
/>
</FrameLayout>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/leftFragmentContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<LinearLayout
android:id="@+id/linear_layout_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
>
<View
android:id="@+id/stubView"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight=".4"
/>
<FrameLayout
android:id="@+id/rightFragmentContainer"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight=".6"
/>
</LinearLayout>
</FrameLayout>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question