Android的圆形画廊?画廊、圆形、Android

由网友(回眸゛似水流年)分享简介:我是新手到Android development.Now我想这样做画廊查看圆形像图像below.The的事情是,我想放大的中心图像时用户滚动由左到右,从右到左。是否有任何教程是什么?I am a newbie to android development.Now i would like to do gallery...

我是新手到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.

谢谢, 森

阅读全文

相关推荐

最新文章