Merge "Remove redundant toolbar from CollapsingToolbarLayout"
This commit is contained in:
committed by
Android (Google) Code Review
commit
0cb063c9e4
@@ -23,7 +23,6 @@
|
|||||||
android:transitionGroup="true">
|
android:transitionGroup="true">
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/appbar_layout"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="180dp"
|
android:layout_height="180dp"
|
||||||
android:theme="@style/Theme.CollapsingToolbar.Settings">
|
android:theme="@style/Theme.CollapsingToolbar.Settings">
|
||||||
@@ -39,21 +38,14 @@
|
|||||||
app:statusBarScrim="?android:attr/colorPrimary"
|
app:statusBarScrim="?android:attr/colorPrimary"
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
||||||
app:expandedTitleMarginStart="18dp"
|
app:expandedTitleMarginStart="18dp"
|
||||||
app:toolbarId="@id/tool_bar">
|
app:toolbarId="@id/action_bar">
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
|
||||||
android:id="@+id/tool_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="?attr/actionBarSize"
|
|
||||||
app:layout_collapseMode="pin"
|
|
||||||
app:contentInsetStart="68dp"/>
|
|
||||||
|
|
||||||
<Toolbar
|
<Toolbar
|
||||||
android:id="@+id/action_bar"
|
android:id="@+id/action_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="?attr/actionBarSize"
|
||||||
app:layout_collapseMode="pin"
|
android:theme="?android:attr/actionBarTheme"
|
||||||
android:theme="?android:attr/actionBarTheme"/>
|
app:layout_collapseMode="pin"/>
|
||||||
|
|
||||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
@@ -306,9 +306,7 @@ public class SettingsActivity extends SettingsBaseActivity
|
|||||||
if (actionBar != null) {
|
if (actionBar != null) {
|
||||||
actionBar.setDisplayHomeAsUpEnabled(!isInSetupWizard);
|
actionBar.setDisplayHomeAsUpEnabled(!isInSetupWizard);
|
||||||
actionBar.setHomeButtonEnabled(!isInSetupWizard);
|
actionBar.setHomeButtonEnabled(!isInSetupWizard);
|
||||||
// TODO(b/176882938): Enable title after material component updated
|
actionBar.setDisplayShowTitleEnabled(true);
|
||||||
// If CollapsingToolbarLayout is applied, the old action bar won't show title.
|
|
||||||
actionBar.setDisplayShowTitleEnabled(mCollapsingToolbarLayout == null);
|
|
||||||
}
|
}
|
||||||
mMainSwitch = findViewById(R.id.switch_bar);
|
mMainSwitch = findViewById(R.id.switch_bar);
|
||||||
if (mMainSwitch != null) {
|
if (mMainSwitch != null) {
|
||||||
|
@@ -115,9 +115,7 @@ public class MobileNetworkActivity extends SettingsBaseActivity
|
|||||||
final ActionBar actionBar = getActionBar();
|
final ActionBar actionBar = getActionBar();
|
||||||
if (actionBar != null) {
|
if (actionBar != null) {
|
||||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||||
// TODO(b/176882938): Enable title after material component updated
|
actionBar.setDisplayShowTitleEnabled(true);
|
||||||
// If CollapsingToolbarLayout is applied, the old action bar won't show title.
|
|
||||||
actionBar.setDisplayShowTitleEnabled(mCollapsingToolbarLayout == null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getProxySubscriptionManager().setLifecycle(getLifecycle());
|
getProxySubscriptionManager().setLifecycle(getLifecycle());
|
||||||
|
Reference in New Issue
Block a user