How to achieve overlapping of the content of one fragment by other fragment?

Have: two fragments
1)Slice list
2)Slice details
Created and dynamically replaced..
in the markup:
<linearlayout android:orientation="horizontal" android:layout_width="parent" android:layout_height="parent" android:id="@+id/linear_layout_container">

 <framelayout android:id="@+id/leftFragmentContainer" android:layout_width="0dp" android:layout_height="parent" android:layout_weight=".4">

 <framelayout android:id="@+id/rightFragmentContainer" android:layout_width="0dp" android:layout_height="parent" android:layout_weight=".6">

 </framelayout></framelayout></linearlayout>

It is necessary that a fragment of the parts, superimposed on a fragment of the list, blocking part of content *and not to narrow down the snippet of Licht*
A hypothetical example in pictures:
A fragment of the list

1e44032d6fcd4b29be006f97dca43ff6.png

Fragment details

5f7a3c66752b4f988b51c507a5014b79.png
July 9th 19 at 14:00
1 answer
July 9th 19 at 14:02
Solution
This:

<framelayout android:id="@+id/linear_layout_container" android:layout_width="parent" android:layout_height="parent">

 <framelayout android:id="@+id/leftFragmentContainer" android:layout_width="parent" android:layout_height="parent">

 <framelayout android:id="@+id/rightFragmentContainer" android:layout_width="parent" android:layout_gravity="top|left" android:layout_height="parent" android:layout_marginleft="250dp">

 </framelayout></framelayout></framelayout>


or so
<framelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="parent" android:layout_height="parent">

 <framelayout android:id="@+id/leftFragmentContainer" android:layout_width="parent" android:layout_height="parent">


 <linearlayout android:id="@+id/linear_layout_container" android:layout_width="parent" android:layout_height="parent" android:orientation="horizontal">

 <view android:id="@+id/stubView" android:layout_width="0dp" android:layout_height="parent" android:layout_weight=".4">

 <framelayout android:id="@+id/rightFragmentContainer" android:layout_width="0dp" android:layout_height="parent" android:layout_weight=".6">

</framelayout></view></linearlayout>
</framelayout></framelayout>
hmm.. an interesting option.. but what to do later with stubView? it's just not the only fragments that will fit in linear_layout_container.. in combination of other pieces I might not even need that view.. or is it just an empty stub that would rightFragmentContainer was right? - Estella59 commented on July 9th 19 at 14:05
: this is just a stub - nayeli_OConner39 commented on July 9th 19 at 14:08
hmm.. but if I have a case if the fragment is placed in leftFragmentContainer should take 0.4 of the size of the parent? what I should I do?.. just the photos are a wide option list.. but there is still a fragment with a narrow list.. and in these cases the content will be extended to parent.. - Estella59 commented on July 9th 19 at 14:11
All lit! =) on particular cases with a narrow list, put code to change the width at leftFragmentContainer.. but to the original question it is not to be treated =)
Thank you very much! - Estella59 commented on July 9th 19 at 14:14

Find more questions by tags Android