Skip to content

Commit

Permalink
(ui): update collapsing toolbar style
Browse files Browse the repository at this point in the history
  • Loading branch information
mardous committed Dec 22, 2024
1 parent 35d6e19 commit c94249f
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 28 deletions.
4 changes: 2 additions & 2 deletions app/src/main/res/layout/fragment_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
android:fitsSystemWindows="true">

<com.google.android.material.appbar.CollapsingToolbarLayout
style="?collapsingToolbarLayoutLargeStyle"
style="?collapsingToolbarLayoutMediumStyle"
android:layout_width="match_parent"
android:layout_height="?collapsingToolbarLayoutLargeSize"
android:layout_height="?collapsingToolbarLayoutMediumSize"
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">

<com.google.android.material.appbar.MaterialToolbar
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/fragment_conversations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
android:fitsSystemWindows="true">

<com.google.android.material.appbar.CollapsingToolbarLayout
style="?collapsingToolbarLayoutLargeStyle"
style="?collapsingToolbarLayoutMediumStyle"
android:layout_width="match_parent"
android:layout_height="?collapsingToolbarLayoutLargeSize"
android:layout_height="?collapsingToolbarLayoutMediumSize"
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">

<com.google.android.material.appbar.MaterialToolbar
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/fragment_message_a_number.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@

<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar_layout"
style="?collapsingToolbarLayoutLargeStyle"
style="?collapsingToolbarLayoutMediumStyle"
android:layout_width="match_parent"
android:layout_height="?collapsingToolbarLayoutLargeSize"
android:layout_height="?collapsingToolbarLayoutMediumSize"
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">

<com.google.android.material.appbar.MaterialToolbar
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/fragment_messages.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
android:fitsSystemWindows="true">

<com.google.android.material.appbar.CollapsingToolbarLayout
style="?collapsingToolbarLayoutLargeStyle"
style="?collapsingToolbarLayoutMediumStyle"
android:layout_width="match_parent"
android:layout_height="?collapsingToolbarLayoutLargeSize"
android:layout_height="?collapsingToolbarLayoutMediumSize"
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">

<com.google.android.material.appbar.MaterialToolbar
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/fragment_messageview_terms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
android:fitsSystemWindows="true">

<com.google.android.material.appbar.CollapsingToolbarLayout
style="?collapsingToolbarLayoutLargeStyle"
style="?collapsingToolbarLayoutMediumStyle"
android:layout_width="match_parent"
android:layout_height="?collapsingToolbarLayoutLargeSize"
android:layout_height="?collapsingToolbarLayoutMediumSize"
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">

<com.google.android.material.appbar.MaterialToolbar
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/fragment_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@

<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar_layout"
style="?collapsingToolbarLayoutLargeStyle"
style="?collapsingToolbarLayoutMediumStyle"
android:layout_width="match_parent"
android:layout_height="?collapsingToolbarLayoutLargeSize"
android:layout_height="?collapsingToolbarLayoutMediumSize"
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">

<com.google.android.material.appbar.MaterialToolbar
Expand Down
8 changes: 1 addition & 7 deletions app/src/main/res/layout/fragment_statuses.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,8 @@
android:id="@+id/collapsing_toolbar_layout"
style="?collapsingToolbarLayoutMediumStyle"
android:layout_width="match_parent"
android:layout_height="?collapsingToolbarLayoutLargeSize"
app:collapsedTitleTextColor="?attr/colorOnSurface"
app:collapsedTitleTextAppearance="?textAppearanceTitleLarge"
app:expandedTitleTextColor="?attr/colorOnSurface"
app:expandedTitleTextAppearance="?textAppearanceHeadlineLarge"
app:expandedTitleMarginStart="24dp"
android:layout_height="?collapsingToolbarLayoutMediumSize"
app:title="@string/app_name"
app:titleCollapseMode="scale"
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">

<com.google.android.material.appbar.MaterialToolbar
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/fragment_tool.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@

<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar_layout"
style="?collapsingToolbarLayoutLargeStyle"
style="?collapsingToolbarLayoutMediumStyle"
android:layout_width="match_parent"
android:layout_height="?collapsingToolbarLayoutLargeSize"
android:layout_height="?collapsingToolbarLayoutMediumSize"
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">

<com.google.android.material.appbar.MaterialToolbar
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-night/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<item name="materialButtonStyle">@style/MaterialButtonStyle</item>
<item name="toolbarStyle">@style/ToolbarStyle</item>
<item name="preferenceCategoryStyle">@style/MaterialPreferenceCategory</item>
<item name="collapsingToolbarLayoutLargeStyle">@style/CollapsingToolbarLargeStyle</item>
<item name="collapsingToolbarLayoutMediumStyle">@style/CollapsingToolbarMediumStyle</item>
</style>

<style name="AlertDialogTheme.Black">
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-v31/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<item name="materialButtonStyle">@style/MaterialButtonStyle</item>
<item name="toolbarStyle">@style/ToolbarStyle</item>
<item name="preferenceCategoryStyle">@style/MaterialPreferenceCategory</item>
<item name="collapsingToolbarLayoutLargeStyle">@style/CollapsingToolbarLargeStyle</item>
<item name="collapsingToolbarLayoutMediumStyle">@style/CollapsingToolbarMediumStyle</item>
</style>

<style name="Theme.WhatSave" parent="Base.Theme.WhatSave.DynamicColors"/>
Expand Down
10 changes: 6 additions & 4 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@
<item name="titleMarginStart">16dp</item>
</style>

<style name="CollapsingToolbarLargeStyle" parent="Widget.Material3.CollapsingToolbar.Large">
<item name="expandedTitleMarginBottom">24dp</item>
<item name="expandedTitleMarginEnd">24dp</item>
<style name="CollapsingToolbarMediumStyle" parent="Widget.Material3.CollapsingToolbar.Medium">
<item name="collapsedTitleTextAppearance">?textAppearanceTitleLarge</item>
<item name="collapsedTitleTextColor">?attr/colorOnSurface</item>
<item name="expandedTitleTextAppearance">?textAppearanceHeadlineLarge</item>
<item name="expandedTitleTextColor">?attr/colorOnSurface</item>
<item name="expandedTitleMarginStart">24dp</item>
<item name="expandedTitleTextAppearance">?textAppearanceHeadline4</item>
<item name="titleCollapseMode">scale</item>
</style>

<style name="BottomNavigationStyle" parent="Widget.Material3.BottomNavigationView"/>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<item name="materialButtonStyle">@style/MaterialButtonStyle</item>
<item name="toolbarStyle">@style/ToolbarStyle</item>
<item name="preferenceCategoryStyle">@style/MaterialPreferenceCategory</item>
<item name="collapsingToolbarLayoutLargeStyle">@style/CollapsingToolbarLargeStyle</item>
<item name="collapsingToolbarLayoutMediumStyle">@style/CollapsingToolbarMediumStyle</item>
</style>

<style name="Theme.WhatSave" parent="Base.Theme.WhatSave"/>
Expand Down

0 comments on commit c94249f

Please sign in to comment.