首页 > 移动平台 > 详细

android图片全景360°自动(手动)循环滚动

时间:2015-01-29 09:39:14      阅读:281      评论:0      收藏:0      [点我收藏+]

一个自定义控件:

地址

github:https://github.com/guoGavin/PanoramicAutoScroll

csdn:http://download.csdn.net/detail/jiguangcanhen/8404891

效果图

技术分享

功能

  • 按照一定的速度自动滚动。
  • 当手指进行操作则停止滚动,手指放开则继续滚动。
  • 可以设置为无限循环滚动或者无限往复滚动。
  • 可以设置滚动速度。

Layout

<com.gavin.panoramicautoscroll.AutoScrollHorizontalScrollView
    android:id="@+id/scrollView"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:scrollbars="none"
      android:background="@android:color/transparent" >

      <LinearLayout 
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="horizontal" />

    </com.gavin.panoramicautoscroll.AutoScrollHorizontalScrollView>

滚动方式

enum ShowWay{
        cycle,//Infinite scrolling
        repeat,//Scroll back and forth
    }

自动滚动速度

enum Speed{
        slow, 
        medium,
        fast,
    }

设置以及启动

autoScrollView.setShowContent(bitmap);
autoScrollView.setSpeed(speedResult);
autoScrollView.setShowWay(showWayResult);
autoScrollView.startAutoScroll();

android图片全景360°自动(手动)循环滚动

原文:http://blog.csdn.net/jiguangcanhen/article/details/43234043

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!