如何实现在安卓定制的堆栈视图? [英] How to implement customized stack view in android?

查看:251
本文介绍了如何实现在安卓定制的堆栈视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网上搜索,但我无法找到一些很好的解释或建议。 基本上,我想实现这个功能。

I have searched the internet but I couldn't find some good explanation or advice. Basically, I want to implement this functionality.

上滑下

on slide down

我用StackView类和所有我得到的是这样的对角线堆栈

I used the StackView class and all I get is this "diagonal" stack

我想的观点是一个在后面的另一个,如上述的图片。

I want views to be one behind another, as in the pictures above.

类似的问题是问在这里 - > Android的定制stackview 的,但我无法找到任何令人满意答案。

Similar question is asked here -> Android customize stackview, but I couldn't find any satisfying answers.

我已经阅读了$ C $下StackView的建议,但说实话,我不知道我将如何自定义它来获得我想要的。 当我改变PERSPECTIVE_SHIFT_FACTOR_X的价值或 PERSPECTIVE_SHIFT_FACTOR_Y没有什么变化,我也得到了同样的立体图。我失去了一些东西?

I have read the code for StackView as suggested, but honestly, I don't know how would I customize it to get what I want. When I change the value of PERSPECTIVE_SHIFT_FACTOR_X or PERSPECTIVE_SHIFT_FACTOR_Y nothing changes and I get the same "diagonal view". Am I missing something?

在此先感谢您的答案。

推荐答案

随意这里用我的库中提供

Feel free to use my library available here.

这不正是你想要的,是根据 ViewPager ,所以你可以使用它只是一个典型的 PagerAdapter 您的选择。

It does exactly what you want and is based on the ViewPager so you can use it with just a typical PagerAdapter of your choice.

这篇关于如何实现在安卓定制的堆栈视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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