Loading packages/SettingsLib/CollapsingToolbarBaseActivity/res/layout-v31/non_collapsing_toolbar_base_layout.xml 0 → 100644 +25 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2024 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/content_parent" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <include layout="@layout/non_collapsing_toolbar_content_layout"/> </androidx.coordinatorlayout.widget.CoordinatorLayout> packages/SettingsLib/CollapsingToolbarBaseActivity/res/layout-v31/non_collapsing_toolbar_content_layout.xml 0 → 100644 +45 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2024 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <merge xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <com.google.android.material.appbar.AppBarLayout android:id="@+id/app_bar" android:layout_width="match_parent" android:layout_height="wrap_content" android:fitsSystemWindows="true" android:outlineAmbientShadowColor="@android:color/transparent" android:outlineSpotShadowColor="@android:color/transparent" android:background="@android:color/transparent" android:theme="@style/Theme.CollapsingToolbar.Settings"> <Toolbar android:id="@+id/action_bar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:theme="?android:attr/actionBarTheme" android:transitionName="shared_element_view" app:layout_collapseMode="pin"/> </com.google.android.material.appbar.AppBarLayout> <FrameLayout android:id="@+id/content_frame" android:layout_width="match_parent" android:layout_height="wrap_content" app:layout_behavior="@string/appbar_scrolling_view_behavior"/> </merge> packages/SettingsLib/CollapsingToolbarBaseActivity/src/com/android/settingslib/collapsingtoolbar/CollapsingToolbarAppCompatActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -171,7 +171,7 @@ public class CollapsingToolbarAppCompatActivity extends AppCompatActivity { private CollapsingToolbarDelegate getToolbarDelegate() { if (mToolbardelegate == null) { mToolbardelegate = new CollapsingToolbarDelegate(new DelegateCallback()); mToolbardelegate = new CollapsingToolbarDelegate(new DelegateCallback(), true); } return mToolbardelegate; } Loading packages/SettingsLib/CollapsingToolbarBaseActivity/src/com/android/settingslib/collapsingtoolbar/CollapsingToolbarBaseActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -169,7 +169,7 @@ public class CollapsingToolbarBaseActivity extends FragmentActivity { private CollapsingToolbarDelegate getToolbarDelegate() { if (mToolbardelegate == null) { mToolbardelegate = new CollapsingToolbarDelegate(new DelegateCallback()); mToolbardelegate = new CollapsingToolbarDelegate(new DelegateCallback(), true); } return mToolbardelegate; } Loading packages/SettingsLib/CollapsingToolbarBaseActivity/src/com/android/settingslib/collapsingtoolbar/CollapsingToolbarBaseFragment.java +6 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,8 @@ public abstract class CollapsingToolbarBaseFragment extends Fragment { @Override public void onAttach(Context context) { super.onAttach(context); mToolbardelegate = new CollapsingToolbarDelegate(new DelegateCallback()); mToolbardelegate = new CollapsingToolbarDelegate(new DelegateCallback(), useCollapsingToolbar()); } @Nullable Loading Loading @@ -98,4 +99,8 @@ public abstract class CollapsingToolbarBaseFragment extends Fragment { public FrameLayout getContentFrameLayout() { return mToolbardelegate.getContentFrameLayout(); } protected boolean useCollapsingToolbar() { return true; } } Loading
packages/SettingsLib/CollapsingToolbarBaseActivity/res/layout-v31/non_collapsing_toolbar_base_layout.xml 0 → 100644 +25 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2024 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/content_parent" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <include layout="@layout/non_collapsing_toolbar_content_layout"/> </androidx.coordinatorlayout.widget.CoordinatorLayout>
packages/SettingsLib/CollapsingToolbarBaseActivity/res/layout-v31/non_collapsing_toolbar_content_layout.xml 0 → 100644 +45 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2024 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <merge xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <com.google.android.material.appbar.AppBarLayout android:id="@+id/app_bar" android:layout_width="match_parent" android:layout_height="wrap_content" android:fitsSystemWindows="true" android:outlineAmbientShadowColor="@android:color/transparent" android:outlineSpotShadowColor="@android:color/transparent" android:background="@android:color/transparent" android:theme="@style/Theme.CollapsingToolbar.Settings"> <Toolbar android:id="@+id/action_bar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:theme="?android:attr/actionBarTheme" android:transitionName="shared_element_view" app:layout_collapseMode="pin"/> </com.google.android.material.appbar.AppBarLayout> <FrameLayout android:id="@+id/content_frame" android:layout_width="match_parent" android:layout_height="wrap_content" app:layout_behavior="@string/appbar_scrolling_view_behavior"/> </merge>
packages/SettingsLib/CollapsingToolbarBaseActivity/src/com/android/settingslib/collapsingtoolbar/CollapsingToolbarAppCompatActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -171,7 +171,7 @@ public class CollapsingToolbarAppCompatActivity extends AppCompatActivity { private CollapsingToolbarDelegate getToolbarDelegate() { if (mToolbardelegate == null) { mToolbardelegate = new CollapsingToolbarDelegate(new DelegateCallback()); mToolbardelegate = new CollapsingToolbarDelegate(new DelegateCallback(), true); } return mToolbardelegate; } Loading
packages/SettingsLib/CollapsingToolbarBaseActivity/src/com/android/settingslib/collapsingtoolbar/CollapsingToolbarBaseActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -169,7 +169,7 @@ public class CollapsingToolbarBaseActivity extends FragmentActivity { private CollapsingToolbarDelegate getToolbarDelegate() { if (mToolbardelegate == null) { mToolbardelegate = new CollapsingToolbarDelegate(new DelegateCallback()); mToolbardelegate = new CollapsingToolbarDelegate(new DelegateCallback(), true); } return mToolbardelegate; } Loading
packages/SettingsLib/CollapsingToolbarBaseActivity/src/com/android/settingslib/collapsingtoolbar/CollapsingToolbarBaseFragment.java +6 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,8 @@ public abstract class CollapsingToolbarBaseFragment extends Fragment { @Override public void onAttach(Context context) { super.onAttach(context); mToolbardelegate = new CollapsingToolbarDelegate(new DelegateCallback()); mToolbardelegate = new CollapsingToolbarDelegate(new DelegateCallback(), useCollapsingToolbar()); } @Nullable Loading Loading @@ -98,4 +99,8 @@ public abstract class CollapsingToolbarBaseFragment extends Fragment { public FrameLayout getContentFrameLayout() { return mToolbardelegate.getContentFrameLayout(); } protected boolean useCollapsingToolbar() { return true; } }