Android的:如何在片段中创建一个浮动RecyclerView覆盖 [英] Android: How do I create an overlay with a floating RecyclerView within a fragment

查看:300
本文介绍了Android的:如何在片段中创建一个浮动RecyclerView覆盖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不太知道我要寻找的,所以我想我会问,如果有人能1)帮我鉴定它是什么,我试图创建的名称或2)给我一个图书馆的想法/我将如何去创造这一点。

I am not quite sure what I should be searching for, so I thought I would ask if anyone could 1) Help me identify the NAME of what it is I am trying to create or 2) give me an idea of a library / how I would go about creating this.

请参阅本(很差的画)图片:

See this (Poorly-drawn) picture:

我所试图做的是创建一个拥有它的正常含量正常的片段,但是当你preSS按钮地方(即行动起来吧),它会创建一个recyclerview即浮动作为类型对您的片段的顶部覆盖层。理想情况下,如果用户点击其他地方,它会关闭它(所以应该模拟可取消对话框的行为),也让单击视图本身。

What I am trying to do is to create a normal Fragment which has normal content in it, but when you press a button somewhere (IE action bar), it creates a recyclerview that is "floating" as a type of overlay on top of your fragment. Ideally if the user clicks elsewhere, it will close it (So it should simulate the behavior of a dismissible dialog box), but also allow clicking within the view itself.

另外,如果可能的话,我想使+符号和recyclerview(像一条线或东西)之间的连接只是为了表明它已连接并且是一种覆盖。

Also, if possible, I want to make a connection between the + sign and the recyclerview (Like a line or something) just to indicate it is connected and is an overlay.

任何人有任何建议,以什么我应该做的或者我应该寻找?谢谢!

Anyone have any recommendations as to what I should do or what I should be looking for? Thanks!

-sil

推荐答案

您可以将的 DialogFragment 。这样,你可以得到叠加的感觉,而当用户点击它以外的任何地方,你也可以关闭它。

You can place your RecyclerView within a DialogFragment. That way you can get the overlay feel, and you can also dismiss it when user clicks anywhere outside of it.

这篇关于Android的:如何在片段中创建一个浮动RecyclerView覆盖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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