在RecyclerView翻转CardViewRecyclerView、CardView

由网友(學會忘記,知道放弃)分享简介:我想实现在RecyclerView一个CardView翻转。我只是想不通一个简单的解决方案。我有一个工作CardView在那里我可以显示使用回收观点卡的列表。问题是,如何显示卡的背面,如果用户点击该卡。我想使用动画和改变卡的前端到卡的背面。有人可以给一个简单的动画的卡片布局和榜样。我现在的例子是这样的举例pretty...

我想实现在RecyclerView一个CardView翻转。我只是想不通一个简单的解决方案。我有一个工作CardView在那里我可以显示使用回收观点卡的列表。问题是,如何显示卡的背面,如果用户点击该卡。我想使用动画和改变卡的前端到卡的背面。有人可以给一个简单的动画的卡片布局和榜样。 我现在的例子是这样的举例pretty的多副本,其中一个新的活动正在创建。凡为我所需要的卡片翻转180度,并显示其描述。是一种方法来实现呢?

  + ------------------ + ----------------- -  +
| + ---------------- + | | + ---------------- + |
||前|| ||回到||
| + ---------------- + | | + ---------------- + |
| + ---------------- + | | + ---------------- + |
||前|| ||前||
| + ---------------- + | | + ---------------- + |
 

解决方案

您可以使用的 ViewFlipper 。这是一个标准的Andr​​oid窗口小部件。

我的RecyclerView在旋转屏幕后未填满屏幕的解决办法

I am trying to implement a CardView flip in a RecyclerView. I just cannot figure out a simple solution. I have a working CardView where i can display a list of card using the recycler view. The problem is, how to show the back of the card if user click the card. I want to use animation and change the front of the card to the back of the card. Can someone give a simple animation and example of the card layout. My current example is pretty much copy of this example where a new activity is being created. Where as i need the card to flip 180 degree and show the description. Is the a way to achieve it?

+------------------+ +------------------+
|+----------------+| |+----------------+|
||  front         || ||  back          ||
|+----------------+| |+----------------+|
|+----------------+| |+----------------+|
||  front         || ||  front         ||
|+----------------+| |+----------------+|

解决方案

You could use a ViewFlipper. It's a standard Android widget.

阅读全文

相关推荐

最新文章