![](/img/trans.png)
[英]Scroll on top of the CoordinatorLayout and AppBarLayout inside it
[英]CoordinatorLayout, AppBarLayout Reverse Scroll
我正在構建一個聊天應用程序,但有一個小問題。 我的RecyclerView
顛倒了(底部是最新消息),我需要工具欄在我向上滾動而不是向下滾動時隱藏(實際上是相反的隱藏行為)。
有CoordinatorLayout
和AppBarLayout
解決方案嗎? 也許有任何教程?
您應該嘗試擴展ScrollingViewBehavior
並根據需要對其進行修改。 ( https://developer.android.com/reference/android/support/design/widget/AppBarLayout.ScrollingViewBehavior.html )
然后在您的xml中,設置您的自定義行為:
app:layout_behavior="com.example.MyScrollBehavior"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.