Android的圆形画廊? [英] android circular gallery?

查看:120
本文介绍了Android的圆形画廊?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新手到Android development.Now我想这样做画廊查看圆形像图像below.The的事情是,我想放大的中心图像时用户滚动由左到右,从右到左。是否有任何教程是什么?

I am a newbie to android development.Now i would like to do gallery view as circular like image as below.The things is that i want to enlarge the center image when user scroll from left to right and right to left. Is there any tutorials for that ?

我要的是一个已经刷卡需要的图像被放大,而这是在该中心。我以为我可以带库去做。但是从Android开发者的事件,不是一个我想要的。 :(

what I want is the image that's been swiped need to be enlarged while it's at the center. I thought I could do it with Gallery. but the example from the android developer is not the one I want. :(

推荐答案


如果您想要放大的中心选定的图像有一种可能的方式。 在您的onItemSelected方法,只需拨打一个动画缩放的对象。画廊的特性是,它始终是中心锁定。因此,中心元素将被永远选择。 希望将工作..


If you want to enlarge the center selected image there is one possible way. On your onItemSelected method, just call an animation to zoom the object. The property of gallery is that it is always center-locked. So the center element will be always selected. Hope that will work..

<?xml version="1.0" encoding="utf-8"?>
<set
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:shareInterpolator="false"
    android:fillAfter="true"
>
<scale 
       android:fromXScale="1.0"
       android:toXScale="1.50"
       android:fromYScale="1.0"
       android:toYScale="1.50"
       android:duration="600"
       android:pivotX="50%"
       android:pivotY="50%"
       android:fillAfter="true"/>

</set>

请记住,你将不得不存储previous视图时,该元件是由中央应该投入到正常大小搬走。

Do remember that you will have to store the previous view as when the element is move away from center it should be put to the normal size.

所以,你可以有两种观点 - prevView和currView
请在currView动画。

So you can have two views - prevView and currView.
Do the animation on the currView.

谢谢,

这篇关于Android的圆形画廊?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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