mirror of
https://github.com/pachli/pachli-android.git
synced 2025-02-05 11:47:47 +01:00
fix: Remove second AppBarLayout
from activity_trending
Previous code `include`'d `toolbar_basic` inside an `AppBarLayout`. But `toolbar_basic` already contains an `AppBarLayout`, which resulted in some rendering issues. Remove the `include` and incorporate the `MaterialToolbar` directly. Set the toolbar to scroll out of the way when the screen scrolls, so the behaviour is consistent with the tabs in `MainActivity` and `AccountActivity`.
This commit is contained in:
parent
f2cce6947e
commit
d2d6f147ea
@ -52,7 +52,7 @@ class TrendingActivity : BottomSheetActivity(), HasAndroidInjector, MenuProvider
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(binding.root)
|
||||
|
||||
setSupportActionBar(binding.includedToolbar.toolbar)
|
||||
setSupportActionBar(binding.toolbar)
|
||||
|
||||
supportActionBar?.run {
|
||||
setTitle(R.string.title_public_trending)
|
||||
|
@ -30,9 +30,11 @@
|
||||
android:elevation="@dimen/actionbar_elevation"
|
||||
app:elevationOverlayEnabled="false">
|
||||
|
||||
<include
|
||||
android:id="@+id/includedToolbar"
|
||||
layout="@layout/toolbar_basic" />
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:layout_scrollFlags="scroll|enterAlways" />
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tab_layout"
|
||||
|
Loading…
x
Reference in New Issue
Block a user