[英]GridView delete multiple items like iphone apps uninstallation View
I have a GridView
in which I am showing list of books. 我有一个
GridView
,其中正在显示书籍列表。 I have tried by creating custom layout and putting cancel button onlongclick listener of a view. 我尝试通过创建自定义布局并将取消按钮放在视图的longclick侦听器上。 But i am not able to apply a shaking animation to the items.
但是我无法对这些物品应用摇晃的动画。 Can anyone guide me how can i apply an animation to the items and make it similarly like iphone?
谁能指导我如何将动画应用到这些项目上并使其类似于iphone?
Now I want to provide feature to delete the Multiple items from the GridView
like the View
which shows as below: 现在, 我想提供从
GridView
删除多个项目的功能,例如如下所示的View
:
I did lots of research for this ,but failed to get such kind of view in Android. 我为此做了很多研究,但未能在Android中获得这种观点。
Can any one guide me for this? 有人可以为此指导我吗?
You'll have to make a custom gridview for that. 您必须为此创建一个自定义的gridview。 Place a button (x) on top of the grid item and set its visibility to invisible.. onLongPress of the grid item , make that button visible .. onclick of the button, delete that grid item by getting its id.
将一个按钮(x)放在网格项目的顶部,并将其可见性设置为invisible .. onLongPress的网格项目 ,使该按钮可见 .. onclick的按钮,通过获取其ID删除该网格项目。
Hope I have given you a direction. 希望我能给您指示。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.