Coder Social home page Coder Social logo

androidcarrousellayout's Introduction

AndroidCarrouselLayout

a carrousel layout for android

Preview

image image image image image image

Example

app-debug.apk

How to Use

gradle

    compile 'com.dalong:carrousellayout:1.0.0'   

or Maven

    <dependency>
      <groupId>com.dalong</groupId>
      <artifactId>carrousellayout</artifactId>
      <version>1.0.0</version>
      <type>pom</type>
    </dependency>                    

xml:

     <com.dalong.carrousellayout.CarrouselLayout
           android:id="@+id/carrousel"
           app:rotateDirection="anticlockwise"
           app:r="200dp"
           app:rotationTime="3000"
           android:gravity="center"
           android:layout_marginBottom="180dp"
           android:layout_width="match_parent"
           android:layout_height="match_parent">
          <ImageView
              android:src="@mipmap/image1"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content" />
          <ImageView
              android:src="@mipmap/image2"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content" />
              ...
       </com.dalong.carrousellayout.CarrouselLayout>

java:

    CarrouselLayout carrousel= (CarrouselLayout) findViewById(R.id.carrousel);
    carrousel.setR(width/3)//设置R的大小
             .setAutoRotation(false)//是否自动切换
             .setAutoRotationTime(1500);//自动切换的时间  单位毫秒

#License

Copyright 2016 dalong

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

androidcarrousellayout's People

Contributors

yixiaolunhui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

androidcarrousellayout's Issues

Make a suggestion

Hello :
Thank you very much for sharing your results, And saved me a lot of time, Thank you very much againl, but, I found some problems, When I say item listens for an event, When the sliding view has no fingers, It triggers an onClick event directly to the view, So l'd like to make a suggestion, Define a Boolean type variable, in setCanAutoRotation, False in ACTION_DOWN from setCanAutoRotation, true in ACTION_MOVE, The onClick event of the subview in the checkChildView then determines that the Boolean type variable is false, To enter the onItemClick event.
I hope you can see my lssues.
Wish you a happy life.

Change side layout size

Hello,
Thanks for this library.
I need to increase the side layouts size with respect to center layout.

image

Can you please tell me if there any inbuilt method in the library through which I can change the size. Or
if I need to modify the library where should I look to make these changes.

Thanks

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.