-
-
Notifications
You must be signed in to change notification settings - Fork 400
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MovieCollectionActivity: use large, multi-line top app bar
Scroll effects do not work and break insets, so not using them for now.
- Loading branch information
1 parent
ff893d3
commit e883024
Showing
4 changed files
with
58 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<include | ||
android:id="@+id/sgAppBarLayout" | ||
layout="@layout/top_app_bar_medium" /> | ||
|
||
<FrameLayout | ||
android:id="@+id/content_frame" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> | ||
|
||
</androidx.coordinatorlayout.widget.CoordinatorLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<!-- This top app bar allows longer titles and elevates if content scrolls behind it, | ||
but stays otherwise in place. --> | ||
<!-- Note: collapsing (setting layout_scrollFlags) breaks insets. --> | ||
|
||
<com.google.android.material.appbar.AppBarLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:id="@+id/sgAppBarLayout" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:fitsSystemWindows="true" | ||
app:liftOnScroll="true"> | ||
|
||
<!-- Use titleCollapseMode="scale" so CollapsingToolbarLayout | ||
does not disable liftOnScroll of app bar. --> | ||
<com.google.android.material.appbar.CollapsingToolbarLayout | ||
style="?attr/collapsingToolbarLayoutMediumStyle" | ||
android:layout_width="match_parent" | ||
android:layout_height="?attr/collapsingToolbarLayoutMediumSize" | ||
android:theme="@style/ThemeOverlay.SeriesGuide.Toolbar.Surface" | ||
app:maxLines="2" | ||
app:titleCollapseMode="scale"> | ||
|
||
<androidx.appcompat.widget.Toolbar | ||
android:id="@+id/sgToolbar" | ||
style="@style/Widget.SeriesGuide.Toolbar" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
tools:title="App Bar Title That Is Very Long And Will Wrap" /> | ||
|
||
</com.google.android.material.appbar.CollapsingToolbarLayout> | ||
|
||
</com.google.android.material.appbar.AppBarLayout> |