mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-14 08:15:04 +01:00
Fix scroll flags
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
47ad0038cc
commit
d52ceff6d6
@ -112,11 +112,17 @@ abstract class BaseController : ButterKnifeController(), ComponentCallbacks {
|
||||
it.floatingActionButton?.isVisible = value
|
||||
it.toolbar.isVisible = !value
|
||||
|
||||
val layoutParams = it.searchCardView?.layoutParams as AppBarLayout.LayoutParams
|
||||
|
||||
if (value) {
|
||||
it.appBar?.setBackgroundResource(R.color.transparent)
|
||||
layoutParams.scrollFlags = AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL or AppBarLayout.LayoutParams.SCROLL_FLAG_SNAP or AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS
|
||||
} else {
|
||||
it.appBar?.setBackgroundResource(R.color.colorPrimary)
|
||||
layoutParams.scrollFlags = 0
|
||||
}
|
||||
|
||||
it.searchCardView?.layoutParams = layoutParams
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,6 +48,7 @@
|
||||
android:background="@color/transparent"
|
||||
android:theme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar"
|
||||
app:contentInsetStartWithNavigation="0dp"
|
||||
app:layout_scrollFlags="enterAlwaysCollapsed|noScroll"
|
||||
app:popupTheme="@style/appActionBarPopupMenu" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
@ -57,7 +58,7 @@
|
||||
android:id="@+id/controller_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"/>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/floatingActionButton"
|
||||
|
@ -40,8 +40,7 @@
|
||||
app:cardBackgroundColor="@color/transparent"
|
||||
android:elevation="2dp"
|
||||
app:cardElevation="2dp"
|
||||
android:visibility="gone"
|
||||
app:layout_scrollFlags="scroll|enterAlways|snap">
|
||||
android:visibility="gone">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
|
Loading…
Reference in New Issue
Block a user