mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-23 08:30:44 +00:00
Replace FrameLayout with FragmentContainerView where applicable
This commit is contained in:
parent
c7efa8c4f1
commit
6a9d5fd4cc
@ -56,11 +56,11 @@ public class SettingsActivity extends AppCompatActivity
|
|||||||
SettingsLayoutBinding.inflate(getLayoutInflater());
|
SettingsLayoutBinding.inflate(getLayoutInflater());
|
||||||
setContentView(settingsLayoutBinding.getRoot());
|
setContentView(settingsLayoutBinding.getRoot());
|
||||||
|
|
||||||
setSupportActionBar(settingsLayoutBinding.toolbarLayout.toolbar);
|
setSupportActionBar(settingsLayoutBinding.settingsToolbarLayout.toolbar);
|
||||||
|
|
||||||
if (savedInstanceBundle == null) {
|
if (savedInstanceBundle == null) {
|
||||||
getSupportFragmentManager().beginTransaction()
|
getSupportFragmentManager().beginTransaction()
|
||||||
.replace(R.id.fragment_holder, new MainSettingsFragment())
|
.replace(R.id.settings_fragment_holder, new MainSettingsFragment())
|
||||||
.commit();
|
.commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ public class SettingsActivity extends AppCompatActivity
|
|||||||
getSupportFragmentManager().beginTransaction()
|
getSupportFragmentManager().beginTransaction()
|
||||||
.setCustomAnimations(R.animator.custom_fade_in, R.animator.custom_fade_out,
|
.setCustomAnimations(R.animator.custom_fade_in, R.animator.custom_fade_out,
|
||||||
R.animator.custom_fade_in, R.animator.custom_fade_out)
|
R.animator.custom_fade_in, R.animator.custom_fade_out)
|
||||||
.replace(R.id.fragment_holder, fragment)
|
.replace(R.id.settings_fragment_holder, fragment)
|
||||||
.addToBackStack(null)
|
.addToBackStack(null)
|
||||||
.commit();
|
.commit();
|
||||||
return true;
|
return true;
|
||||||
|
@ -612,14 +612,12 @@
|
|||||||
|
|
||||||
</org.schabi.newpipe.views.FocusAwareCoordinator>
|
</org.schabi.newpipe.views.FocusAwareCoordinator>
|
||||||
|
|
||||||
<FrameLayout
|
<androidx.fragment.app.FragmentContainerView
|
||||||
android:id="@+id/relatedStreamsLayout"
|
android:id="@+id/relatedStreamsLayout"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:layout_weight="3">
|
android:layout_weight="3" />
|
||||||
|
|
||||||
</FrameLayout>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
layout="@layout/toolbar_layout"
|
layout="@layout/toolbar_layout"
|
||||||
android:id="@+id/toolbar_layout" />
|
android:id="@+id/toolbar_layout" />
|
||||||
|
|
||||||
<FrameLayout
|
<androidx.fragment.app.FragmentContainerView
|
||||||
android:id="@+id/frame"
|
android:id="@+id/frame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent" />
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<FrameLayout
|
<androidx.fragment.app.FragmentContainerView
|
||||||
android:id="@+id/fragment_holder"
|
android:id="@+id/fragment_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
@ -18,14 +18,14 @@
|
|||||||
layout="@layout/toolbar_layout"
|
layout="@layout/toolbar_layout"
|
||||||
android:id="@+id/toolbar_layout"/>
|
android:id="@+id/toolbar_layout"/>
|
||||||
|
|
||||||
<FrameLayout
|
<androidx.fragment.app.FragmentContainerView
|
||||||
android:id="@+id/fragment_player_holder"
|
android:id="@+id/fragment_player_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
app:behavior_hideable="true"
|
app:behavior_hideable="true"
|
||||||
app:behavior_peekHeight="0dp"
|
app:behavior_peekHeight="0dp"
|
||||||
app:layout_behavior="org.schabi.newpipe.player.event.CustomBottomSheetBehavior"></FrameLayout>
|
app:layout_behavior="org.schabi.newpipe.player.event.CustomBottomSheetBehavior" />
|
||||||
|
|
||||||
</org.schabi.newpipe.views.FocusAwareCoordinator>
|
</org.schabi.newpipe.views.FocusAwareCoordinator>
|
||||||
|
|
||||||
|
@ -6,14 +6,14 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:context="org.schabi.newpipe.MainActivity">
|
tools:context="org.schabi.newpipe.MainActivity">
|
||||||
|
|
||||||
<FrameLayout
|
<androidx.fragment.app.FragmentContainerView
|
||||||
android:id="@+id/fragment_holder"
|
android:id="@+id/settings_fragment_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginTop="?attr/actionBarSize" />
|
android:layout_marginTop="?attr/actionBarSize" />
|
||||||
|
|
||||||
<include
|
<include
|
||||||
layout="@layout/toolbar_layout"
|
layout="@layout/toolbar_layout"
|
||||||
android:id="@+id/toolbar_layout"/>
|
android:id="@+id/settings_toolbar_layout"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
Loading…
Reference in New Issue
Block a user