Code Monkey home page Code Monkey logo

android-widget-carrouselview's Introduction

CarrouselView

旋转木马优化版,适合超过5个以上的旋转view界面 如果你只需要3-4个的切换的话还是采用这个吧: https://github.com/dalong982242260/LoopRotarySwitch ##效果 image

##本代码借鉴于:http://www.codeproject.com/Articles/146145/Android-3D-Carousel

##优点: 1、布局可以随意自定义,不受只是图片的限制。 2、增加点击切换到中间位置。 3、手势滑动切换。 4、切换中间回调。 5、自定义适配器更加方便用户设置自己需要的布局。 ##使用方法 1、布局文件引用

 <com.dalong.carrouselview.view.Carousel
    android:id="@+id/carousel"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    />

2、代码设置数据

      carousel = (Carousel) findViewById(R.id.carousel);
      photos.add(new Photo("Photo1", "1"));
      photos.add(new Photo("Photo2", "2"));
      photos.add(new Photo("Photo3", "3"));
      photos.add(new Photo("Photo3", "1"));
      photos.add(new Photo("Photo3", "2"));
      photos.add(new Photo("Photo3", "3"));
      photos.add(new Photo("Photo3", "1"));
      photos.add(new Photo("Photo3", "2"));
      photos.add(new Photo("Photo3", "3"));

      adapter = new MyAdapter(this, photos);
      carousel.setAdapter(adapter);
      adapter.notifyDataSetChanged();

android-widget-carrouselview's People

Contributors

yixiaolunhui avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.