【问题标题】:Sliding Image in imageView Android在imageView Android中滑动图像
【发布时间】:2011-09-02 11:15:12
【问题描述】:

我想在 android 中创建滑动图像 ImageView。在那,当我 将手指移动到右侧而不是当前图像移动到右侧并且 下一个图像显示。当我移动手指时也会做同样的事情 上、下、左。我有一个图像阵列。在那许多图像中... 一张一张我想要幻灯片中的所有图像...我尝试了很多代码但没有 获得正确的输出... 在我的代码中只有 1 个 ImageView 谁能帮我..... 我也尝试了这个链接,但没有得到适当的帮助

sliding between images android

提前致谢

【问题讨论】:

    标签: android android-layout android-emulator


    【解决方案1】:

    那么您正在寻找取景器。

    这些可以帮助您入门,

    http://saigeethamn.blogspot.com/2010/05/image-switcher-view-android-developer.html

    http://www.warriorpoint.com/blog/2009/05/26/android-switching-screens-in-an-activity-with-animations-using-viewflipper/

    http://www.androidguys.com/2008/08/14/flipping-your-views/

    http://www.codeshogun.com/blog/2009/04/16/how-to-implement-swipe-action-in-android/

    样品。

    <Gallery
          android:id="@+id/Gallery01"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"></Gallery> <ImageSwitcher
          android:id="@+id/ImageSwitcher01"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"> </ImageSwitcher>
    
    iSwitcher = (ImageSwitcher) findViewById(R.id.ImageSwitcher01);
                iSwitcher.setFactory(this);
                iSwitcher.setInAnimation(AnimationUtils.loadAnimation(this,
                            android.R.anim.fade_in));
                iSwitcher.setOutAnimation(AnimationUtils.loadAnimation(this,
                            android.R.anim.fade_out));
    

    【讨论】:

    • 感谢您的帮助....但是我尝试了所有代码....动态设置 ....
    猜你喜欢
    • 1970-01-01
    • 2011-10-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多