像FloatingButton一样如何在Snackbar上方移动视图 [英] How to move a view above Snackbar just like FloatingButton

查看:69
本文介绍了像FloatingButton一样如何在Snackbar上方移动视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个线性布局,要在出现Snackbar时向上移动.

I got a linear layout that I want to move up when a Snackbar appears.

我看到了许多示例,该示例如何使用FloatingButton进行操作,但是常规视图又如何呢?

I saw many examples how to do this with FloatingButton, but what about a regular view?

推荐答案

您需要将一个行为添加到LinearLayout中并将其嵌入到CoordinatorLayout中.您可能需要阅读以下内容: http://alisonhuang-blog.logdown.com/posts/290009-design-support-library-coordinator-layout-and-behavior

You need to add a behaviour to your LinearLayout and embed it in a CoordinatorLayout. You might want to read this: http://alisonhuang-blog.logdown.com/posts/290009-design-support-library-coordinator-layout-and-behavior

这篇关于像FloatingButton一样如何在Snackbar上方移动视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆