安卓侧边栏
我一直在使用 Android 版 Firefox,并且非常喜欢使用侧边栏来保存快捷方式图标等。我将如何自己创建一个具有以下属性的类似栏:
- 当我向一个方向滑动时逐渐显示
- 当我向另一个方向滑动时逐渐隐藏
- 可以是自定义宽度
- 我可以动态地将布局注入其中,也可以保持静态内容
有可用的开源代码吗?如果没有,我将使用什么方法来创建它?
I've been using firefox for Android and really like the use of the sidebar to hold shortcut icons and the like. How would I go about creating a similar bar myself with the following attributes:
- progressively revealed as I swipe in one direction
- progressively hides as I swipe in the other direction
- can be a custom width
- I can dynamically inject layout in to it or it can hold static content
Is there any open source code available? If not, what approach would I use to create this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
听起来就像您在描述图库控件。 ApiDemos 项目中有一些示例 这里。
Sound like you're describing a Gallery control. There are some examples in the ApiDemos project here.
第一部分可以通过使用ListView来解决。第二部分我还不知道。我也在寻找这样的组件。
The first part can be solved by using a ListView. The second part I don't know yet. I'm looking for such a component as well.