Home

Awesome

Ferris Wheel View

Android Arsenal Build Status Download License

image

Overview

An Android Library used to implement an animated Ferris Wheel in android.

Preview-demo Monochrome-sample<br /> Inspired by the one-color Planet Coaster loading screen

Mentions

Sample Project

For more information how to use the library in Kotlin/Java checkout Sample App in repository.

Quick Setup

Include library

Using Gradle

FerrisWheelView is distributed using jcenter.

repositories { 
    jcenter()
}
dependencies {
    implementation 'ru.github.igla:ferriswheel:1.2'
}

Or Maven

<dependency>
  <groupId>ru.github.igla</groupId>
  <artifactId>ferriswheel</artifactId>
  <version>1.2</version>
  <type>pom</type>
</dependency>

Usage

Add widget in your xml layout like this:

    <ru.github.igla.ferriswheel.FerrisWheelView
        android:id="@+id/ferrisWheelView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="center"
        app:fwv_cabinsNumber="8"
        app:fwv_rotateSpeed="6" />

To start animation you need only call this method:

    ferrisWheelView.startAnimation()

Or you can stop/pause/resume animation by the following methods:

    ferrisWheelView.stopAnimation()
    ferrisWheelView.pauseAnimation()
    ferrisWheelView.resumeAnimation()

Attributes

attrformatdefaultdescription
fwv_cabinSizedimension42dpthe size of each cabin
fwv_cabinsNumberinteger8the number of cabins on the wheel
fwv_isClockwisebooleantruetoogle the rotate direction
fwv_isAutoRotatebooleantruestart rotating wheel automatically after initialization
fwv_rotateSpeedinteger6wheel speed rotation measured in degrees
fwv_startAnglefloat0angle at which wheel will start to rotate
fwv_wheelStrokeColorcolor#73302b #73302bwith this color the wheel will be filled
fwv_baseStrokeColorcolor#666666 #666666with this color the wheel base will be filled
fwv_cabinFillColorcolorarraywith this color the cabin will be filled
fwv_cabinLineStrokeColorcolor#000000 #000000with this color the cabin line will be filled

Issues

If you find any problems or would like to suggest a feature, please feel free to file an issue

License

Copyright 2018 Igor Lashkov

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.