mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-14 00:05:04 +01:00
Improve view further
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
6520327c01
commit
f71a1b061f
@ -117,19 +117,15 @@ abstract class BaseController : ButterKnifeController(), ComponentCallbacks {
|
|||||||
it.inputEditText.hint = getSearchHint()
|
it.inputEditText.hint = getSearchHint()
|
||||||
|
|
||||||
val layoutParams = it.toolbar.layoutParams as AppBarLayout.LayoutParams
|
val layoutParams = it.toolbar.layoutParams as AppBarLayout.LayoutParams
|
||||||
val layoutParamsForContainer = it.container.layoutParams as CoordinatorLayout.LayoutParams
|
|
||||||
|
|
||||||
if (value) {
|
if (value) {
|
||||||
layoutParams.scrollFlags = AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL or AppBarLayout.LayoutParams.SCROLL_FLAG_SNAP or AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS
|
layoutParams.scrollFlags = AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL or AppBarLayout.LayoutParams.SCROLL_FLAG_SNAP or AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS
|
||||||
layoutParamsForContainer.behavior = FABAwareScrollingViewBehavior()
|
|
||||||
it.appBar.setBackgroundResource(R.color.transparent)
|
it.appBar.setBackgroundResource(R.color.transparent)
|
||||||
} else {
|
} else {
|
||||||
layoutParams.scrollFlags = 0
|
layoutParams.scrollFlags = 0
|
||||||
layoutParamsForContainer.behavior = AppBarLayout.ScrollingViewBehavior()
|
|
||||||
it.appBar.setBackgroundResource(R.color.colorPrimary)
|
it.appBar.setBackgroundResource(R.color.colorPrimary)
|
||||||
}
|
}
|
||||||
|
|
||||||
it.container.layoutParams = layoutParamsForContainer
|
|
||||||
it.toolbar.layoutParams = layoutParams
|
it.toolbar.layoutParams = layoutParams
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
android:id="@+id/controller_container"
|
android:id="@+id/controller_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:layout_behavior="com.nextcloud.talk.utils.animations.FABAwareScrollingViewBehavior" />
|
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
android:id="@+id/floatingActionButton"
|
android:id="@+id/floatingActionButton"
|
||||||
|
@ -31,6 +31,8 @@
|
|||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/recyclerView"
|
android:id="@+id/recyclerView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:paddingBottom="64dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:listitem="@layout/rv_item_conversation_with_last_message" />
|
tools:listitem="@layout/rv_item_conversation_with_last_message" />
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user