Wheel-like spinner widget for Android

Overview

Update Dec 2016

Library is discontinued

There's still a lot of wheel libraries out there.

Update Oct 2014 I am thinking of rewriting this control. Update will contain most requested features, numerous improvements and optimizations. But main point in update is to discontinue ICS lookalike and support Material Design (Android 5.0 Lollipop) look and feel instead. Sadly I wasn't able to find any reference images of something like it.

So if someone will find it - please drop me a line via creating issue, and I'll start tinkering.


This widget is based on wheel widget by Yuri Kanivets. See 'downloads' section for demo or download it from Google Play.

Example Image

Original widget was rewritten a bit to have ICS-like look and feel and to support horizontal scrolling. It should also to be a bit faster due to some optimizations. Please watch out when specifying layout for items - they should have fixed size.

Change local.properties.simple to local.properties and add sdk path to the file

Use IDEA or Android Studio Import Project like this:

Example Image Example Image

Comments
  • WheelHorizontalView - Individual tab drawable

    WheelHorizontalView - Individual tab drawable

    I would to like to set the individual tab width and height in WheelHorizontalView. And set that tab to a drawable that support selected/pressed states.

    I've this done in ViewPagerIndicator (with vpiTabPageIndicatorStyle) but I can't do it here. (This is how I've done it with vpiTabPageIndicatorStyle: http://pastebin.com/wB4vGMyJ)

    What I've tried is to change the selectionDivider to this drawable:

    <?xml version="1.0" encoding="utf-8"?>
    <selector
      xmlns:android="http://schemas.android.com/apk/res/android">
        <item android:state_pressed="true" android:drawable="@drawable/drawable_daychooser_item_pressed" />
        <item android:state_selected="true" android:drawable="@drawable/drawable_daychooser_item_selected" />
        <item android:drawable="@drawable/drawable_daychooser_item_default" />
    </selector>
    

    But that's not working. I've look into wheel__attrs.xml but I could not find an other attribute that has as format an drawable (reference).

    This is how it's now: before

    And this is how I want it: after

    If you're wondering why I've switch from ViewPagerIndicator to android-spinnerwheel see here: http://stackoverflow.com/questions/19764866/viewpagerindicator-set-the-tabpageindicator-to-the-center

    I really appreciate any help you can provide. :+1:

    feature 
    opened by ghost 15
  • Add library to Maven central

    Add library to Maven central

    This library would be a great addition to mavencentral so Android studio (Gradle) users can just add something like "compile 'antistatic:spinnerwheel:+' " to their gradle file. This will increases ease of use and popularity of this library.

    I found a guide which shows you how to do that. Im not doing it myself because I don't own the library but I'd really appreciate it if you publish it to maven.

    Url to the guide: http://www.survivingwithandroid.com/2014/05/android-guide-to-publish-aar-to-maven-gradle.html

    feature 
    opened by izwanink 7
  • Define increments

    Define increments

    Hi, is it possible to increment the wheel on a predefined amount?

    For example, instead of 1,2,3... if I define increments: 5, it should show 5, 10, 15..

    This is a really useful component, hopefully development keeps on

    opened by pellyadolfo 6
  • cannot resolve Gradle dependency

    cannot resolve Gradle dependency

    Hi! I added the gradle dependency as - compile 'com.github.ai212983:android-spinnerwheel:bba368d940' but it doesn't seems to work, it gives a "Failed to resolve error"

    Please do help with the issue, Thanks!

    wont-fix 
    opened by rejochandran 6
  • Compiling the demo?

    Compiling the demo?

    Hello!

    I tried to compile the demo and get several errors. What I have done:

    1. check out the git in Eclipse.
    2. Used "new android project from source" to setup the two different projects ("library" and "antistatic.spinnerwheel.demo.WheelDemo")
    3. The library itself compiles without any problem.
    4. The demo gives me some problems: Using 1.6 as target I have and error with "res\values-v11\styles.xml". 4.1 After setting the target to 3.0 I got other failures: 4.1.1 all settings regarding spinnerwheel (for example app:visibleItems app:selectionDivider and app:selectionDividerWidth) in the layout files are unknown. After deleting them from the layout files I could compile, but at runtime I got errors.

    So. What do I have to do? My guess is xmlns:app="http://schemas.android.com/apk/res/antistatic.spinnerwheel.demo" in the layout files. But change them to what?

    edit: After copying "wheel__attrs.xml" from library project into demo project most problems turn to green.

    opened by Riffer 5
  • Allow different sizes for items

    Allow different sizes for items

    The project description specifies this:

    Please watch out when specifying layout for items - they should have fixed size.

    If you try to do this the produced vies do not align properly.

    Is there a deeper underlying reason for this or is it just convenience? If there is no reason I would love if the library gets improved for different item sizes.

    feature fdev 
    opened by jleidgens 4
  • Wrong behaviour of WheelHorizontalView filled with long length strings

    Wrong behaviour of WheelHorizontalView filled with long length strings

    Hello :)

    please can you fix behaviour of WheelHorizontalView when it is filled with strings that are long? (Like 10 - 30 chars).

    It is just all wrong, spinning doesn't work correctly, highlighting of current item is wrong etc etc.

    But otherwise awesome widget, thanks for it :) Bye

    bug 
    opened by bakua 4
  • sample not building straightaway in android studio

    sample not building straightaway in android studio

    dependency is not resolved

    10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: FATAL EXCEPTION: main 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: Process: antistatic.spinnerwheel.demo, PID: 21180 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{antistatic.spinnerwheel.demo/antistatic.spinnerwheel.demo.ProgrammaticSwitchingActivity}: android.view.InflateException: Binary XML file line #25: Error inflating class antistatic.spinnerwheel.WheelVerticalView 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2314) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2388) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.ActivityThread.access$800(ActivityThread.java:148) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1292) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.os.Looper.loop(Looper.java:135) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5312) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #25: Error inflating class antistatic.spinnerwheel.WheelVerticalView 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.createView(LayoutInflater.java:633) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:504) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:414) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:365) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:377) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.Activity.setContentView(Activity.java:2154) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at antistatic.spinnerwheel.demo.ProgrammaticSwitchingActivity.onCreate(ProgrammaticSwitchingActivity.java:20) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.Activity.performCreate(Activity.java:5953) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1128) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2267) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2388)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.ActivityThread.access$800(ActivityThread.java:148)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1292)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.os.Looper.loop(Looper.java:135)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5312)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: Caused by: java.lang.reflect.InvocationTargetException 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at java.lang.reflect.Constructor.newInstance(Native Method) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at java.lang.reflect.Constructor.newInstance(Constructor.java:288) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.createView(LayoutInflater.java:607) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:504)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:414)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:365)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:377)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.Activity.setContentView(Activity.java:2154)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at antistatic.spinnerwheel.demo.ProgrammaticSwitchingActivity.onCreate(ProgrammaticSwitchingActivity.java:20)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.Activity.performCreate(Activity.java:5953)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1128)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2267)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2388)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.ActivityThread.access$800(ActivityThread.java:148)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1292)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.os.Looper.loop(Looper.java:135)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5312)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/nineoldandroids/animation/ObjectAnimator; 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at antistatic.spinnerwheel.AbstractWheelView.initData(AbstractWheelView.java:167) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at antistatic.spinnerwheel.AbstractWheel.(AbstractWheel.java:126) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at antistatic.spinnerwheel.AbstractWheelView.(AbstractWheelView.java:139) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at antistatic.spinnerwheel.WheelVerticalView.(WheelVerticalView.java:89) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at antistatic.spinnerwheel.WheelVerticalView.(WheelVerticalView.java:78) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at java.lang.reflect.Constructor.newInstance(Native Method)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at java.lang.reflect.Constructor.newInstance(Constructor.java:288)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.createView(LayoutInflater.java:607)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:504)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:414)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:365)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:377)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.Activity.setContentView(Activity.java:2154)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at antistatic.spinnerwheel.demo.ProgrammaticSwitchingActivity.onCreate(ProgrammaticSwitchingActivity.java:20)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.Activity.performCreate(Activity.java:5953)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1128)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2267)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2388)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.ActivityThread.access$800(ActivityThread.java:148)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1292)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.os.Looper.loop(Looper.java:135)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5312)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.nineoldandroids.animation.ObjectAnimator" on path: DexPathList[[zip file "/data/app/antistatic.spinnerwheel.demo-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]] 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:511) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:469) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at antistatic.spinnerwheel.AbstractWheelView.initData(AbstractWheelView.java:167)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at antistatic.spinnerwheel.AbstractWheel.(AbstractWheel.java:126)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at antistatic.spinnerwheel.AbstractWheelView.(AbstractWheelView.java:139)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at antistatic.spinnerwheel.WheelVerticalView.(WheelVerticalView.java:89)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at antistatic.spinnerwheel.WheelVerticalView.(WheelVerticalView.java:78)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at java.lang.reflect.Constructor.newInstance(Native Method)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at java.lang.reflect.Constructor.newInstance(Constructor.java:288)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.createView(LayoutInflater.java:607)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:504)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:414)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:365)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:377)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.Activity.setContentView(Activity.java:2154)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at antistatic.spinnerwheel.demo.ProgrammaticSwitchingActivity.onCreate(ProgrammaticSwitchingActivity.java:20)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.Activity.performCreate(Activity.java:5953)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1128)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2267)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2388)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.ActivityThread.access$800(ActivityThread.java:148)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1292)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.os.Looper.loop(Looper.java:135)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5312)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)  10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: Suppressed: java.lang.ClassNotFoundException: com.nineoldandroids.animation.ObjectAnimator 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at java.lang.Class.classForName(Native Method) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at java.lang.BootClassLoader.findClass(ClassLoader.java:781) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:504) 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: ... 32 more 10-30 18:33:06.314 21180-21180/? E/AndroidRuntime: Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

    wont-fix 
    opened by kunalseedoc 3
  • setVisibleItems not working as expected

    setVisibleItems not working as expected

    Hi, First I want to Thank you for such a nice library for Spinner wheel view. The problem I am facing while implementing is, when I set VisibleItems to 5 on WheelVerticalView , I am able to see 5 items when the view is in scrolling mode. As soon as the scroll finishes, I again see 3 items , rest of the items are not visible.

    Right now the wheel view is like this what_iam_getting

    and I want to be like this,i.e, 5 items should be visible what_i_want

    Can you please help me on this, where I am going wrong ?

    feature wont-fix 
    opened by NehaParmar 3
  • Wrong behavior of horizontal wheel in list view

    Wrong behavior of horizontal wheel in list view

    When I have list of WheelHorizontalView I'm expecting that when I touch it and move up, scroll view will return control to list view, because horizontal view can't scroll themself vertical

    feature 
    opened by mkutgt72 3
  • spinnerwheel v.2.0

    spinnerwheel v.2.0

    Guys, I've checked all the tickets for this repo, and marked items which are relevant to 2.0 version as 'fdev'.

    While I'm getting my thoughts together, feel free to write your own ideas/suggestions for 2.0 version here.

    Let's make Spinnerwheel great again! Thanks.

    fdev 
    opened by ai212983 2
  • Data display error

    Data display error

    When setCyclic is true, if there are multiple data sources, there will be confusion between the data switches. That is to say, the first data source will be displayed in the second data.

    opened by Zheli131411 0
  • can not get center visible item click in WhellviewVerticle.

    can not get center visible item click in WhellviewVerticle.

    can not get center visible item click. When trying to implement below code

    wheel.addClickingListener(new OnWheelClickedListener() {
                        @Override
                        public void onItemClicked(AbstractWheel wheel, int itemIndex) {
                        Toast.makeText(getActivity(), "item" + itemIndex , Toast.LENGTH_SHORT).show();
                        }
                    });
    

    it toast the first item instead center one. so how can we get center item when click perform in wheelview.

    opened by iamnitesh 0
  • onScrollingFinished called after onChanged

    onScrollingFinished called after onChanged

    I used the same same code from the demo app, so I check for the value of the scrolling flag, however by the time onScrollingFinished is finally called to reset the value of this variable, onChanged has already been called and doesn't get called again after that.

    Here's how the log looks like (the boolean value is the value of the scrolling variable):

    08-16 03:08:07.047 4138-4138/ E/MyDebugTag: scrolling started true
    08-16 03:08:07.187 4138-4138/ E/MyDebugTag: scrolling changing true
    08-16 03:08:07.367 4138-4138/ E/MyDebugTag: scrolling changing true
    08-16 03:08:07.707 4138-4138/ E/MyDebugTag: scrolling finished false
    

    And here is the full code: http://hastebin.com/ocidofumoh.java

    bug 
    opened by jgamedev 0
  • Failed to allocate a 889612 byte allocation with 867288 free bytes and 846KB until OOM

    Failed to allocate a 889612 byte allocation with 867288 free bytes and 846KB until OOM

    I am using this library to show some numbers and some text only.

    sometime I got crash reports -- that the library crashed at function called recreateAssets. I don't use any drawings or images with this library.

    here is the log for the crash

    Fatal Exception: java.lang.OutOfMemoryError: Failed to allocate a 889612 byte allocation with 867288 free bytes and 846KB until OOM at dalvik.system.VMRuntime.newNonMovableArray(VMRuntime.java) at android.graphics.Bitmap.nativeCreate(Bitmap.java) at android.graphics.Bitmap.createBitmap(Bitmap.java:942) at android.graphics.Bitmap.createBitmap(Bitmap.java:913) at android.graphics.Bitmap.createBitmap(Bitmap.java:880) at antistatic.spinnerwheel.AbstractWheelView.recreateAssets(AbstractWheelView.java:188) at antistatic.spinnerwheel.AbstractWheel.onLayout(AbstractWheel.java:445) at android.view.View.layout(View.java:16942) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1702) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1556) at android.widget.LinearLayout.onLayout(LinearLayout.java:1465) at android.view.View.layout(View.java:16942) at android.view.ViewGroup.layout(ViewGroup.java:5409) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1702) at android.widget.LinearLayout.layoutHorizontal(LinearLayout.java:1691) at android.widget.LinearLayout.onLayout(LinearLayout.java:1467) at android.view.View.layout(View.java:16942) at android.view.ViewGroup.layout(ViewGroup.java:5409) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1702) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1556) at android.widget.LinearLayout.onLayout(LinearLayout.java:1465) at android.view.View.layout(View.java:16942) at android.view.ViewGroup.layout(ViewGroup.java:5409) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579) at android.widget.FrameLayout.onLayout(FrameLayout.java:514) at android.view.View.layout(View.java:16942) at android.view.ViewGroup.layout(ViewGroup.java:5409) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579) at android.widget.FrameLayout.onLayout(FrameLayout.java:514) at android.view.View.layout(View.java:16942) at android.view.ViewGroup.layout(ViewGroup.java:5409) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579) at android.widget.FrameLayout.onLayout(FrameLayout.java:514) at android.view.View.layout(View.java:16942) at android.view.ViewGroup.layout(ViewGroup.java:5409) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2452) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2156) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1297) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6991) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:777) at android.view.Choreographer.doCallbacks(Choreographer.java:590) at android.view.Choreographer.doFrame(Choreographer.java:560) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:763) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:6872) at java.lang.reflect.Method.invoke(Method.java) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)

    bug 
    opened by huss22us 2
  • java.lang.IllegalArgumentException: width and height must be > 0 in AbstractWheelView.recreateAssets

    java.lang.IllegalArgumentException: width and height must be > 0 in AbstractWheelView.recreateAssets

    If i set abstractWheel.setCurrentItem(0), I am getting the above error.

    07-26 14:39:23.702: W/System.err(23974): java.lang.IllegalArgumentException: width and height must be > 0 07-26 14:39:23.702: W/System.err(23974): at android.graphics.Bitmap.createBitmap(Bitmap.java:638) 07-26 14:39:23.702: W/System.err(23974): at android.graphics.Bitmap.createBitmap(Bitmap.java:620) 07-26 14:39:23.702: W/System.err(23974): at antistatic.spinnerwheel.AbstractWheelView.recreateAssets(AbstractWheelView.java:185) 07-26 14:39:23.712: W/System.err(23974): at antistatic.spinnerwheel.AbstractWheel.onLayout(AbstractWheel.java:457) 07-26 14:39:23.712: W/System.err(23974): at android.view.View.layout(View.java:13856) 07-26 14:39:23.712: W/System.err(23974): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1655) 07-26 14:39:23.712: W/System.err(23974): at android.widget.LinearLayout.layoutHorizontal(LinearLayout.java:1644) 07-26 14:39:23.712: W/System.err(23974): at android.widget.LinearLayout.onLayout(LinearLayout.java:1428) 07-26 14:39:23.712: W/System.err(23974): at android.view.View.layout(View.java:13856) 07-26 14:39:23.712: W/System.err(23974): at android.view.ViewGroup.layout(ViewGroup.java:4424) 07-26 14:39:23.712: W/System.err(23974): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1655) 07-26 14:39:23.722: W/System.err(23974): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1513) 07-26 14:39:23.722: W/System.err(23974): at android.widget.LinearLayout.onLayout(LinearLayout.java:1426) 07-26 14:39:23.722: W/System.err(23974): at android.view.View.layout(View.java:13856) 07-26 14:39:23.722: W/System.err(23974): at android.view.ViewGroup.layout(ViewGroup.java:4424) 07-26 14:39:23.722: W/System.err(23974): at android.widget.FrameLayout.onLayout(FrameLayout.java:448) 07-26 14:39:23.732: W/System.err(23974): at android.view.View.layout(View.java:13856) 07-26 14:39:23.732: W/System.err(23974): at android.view.ViewGroup.layout(ViewGroup.java:4424) 07-26 14:39:23.732: W/System.err(23974): at android.widget.FrameLayout.onLayout(FrameLayout.java:448) 07-26 14:39:23.732: W/System.err(23974): at android.view.View.layout(View.java:13856) 07-26 14:39:23.732: W/System.err(23974): at android.view.ViewGroup.layout(ViewGroup.java:4424) 07-26 14:39:23.732: W/System.err(23974): at android.widget.FrameLayout.onLayout(FrameLayout.java:448) 07-26 14:39:23.732: W/System.err(23974): at android.view.View.layout(View.java:13856) 07-26 14:39:23.742: W/System.err(23974): at android.view.ViewGroup.layout(ViewGroup.java:4424) 07-26 14:39:23.742: W/System.err(23974): at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:1992) 07-26 14:39:23.742: W/System.err(23974): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1813) 07-26 14:39:23.742: W/System.err(23974): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1113) 07-26 14:39:23.742: W/System.err(23974): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4481) 07-26 14:39:23.742: W/System.err(23974): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725) 07-26 14:39:23.742: W/System.err(23974): at android.view.Choreographer.doCallbacks(Choreographer.java:555) 07-26 14:39:23.742: W/System.err(23974): at android.view.Choreographer.doFrame(Choreographer.java:525) 07-26 14:39:23.742: W/System.err(23974): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)

    bug 
    opened by riyazJ 7
Owner
Dimitri Fedorov
Software Engineer
Dimitri Fedorov
Standalone Android widget for picking a single date from a calendar view.

TimesSquare for Android Standalone Android widget for picking a single date from a calendar view. Usage Include CalendarPickerView in your layout XML.

Square 4.4k Dec 20, 2022
An calender widget for your Android home screen.

Todo Agenda - Calendar and Task widgets for Android Todo Agenda is home screen widgets for your Android device. Each widget has its own settings and d

null 368 Dec 21, 2022
An android library which provides a compact calendar view much like the one used in google calenders.

CompactCalendarView CompactCalendarView is a simple calendar view which provides scrolling between months. It's based on Java's Date and Calendar clas

SundeepK 1.5k Dec 9, 2022
Android calendar view (like card)

android-calendar-card (Google Play Demo) Android calendar view (like card) Simple and easy to modify Author: Michał Szwarc #CalendarCardPager License

Michał Szwarc 473 Nov 10, 2022
A TimelineView that will help you create event timelines in apps just like the Google Calendar DayView

TimelineView A TimelineView that will help you create event timelines in apps just like the Google Calendar DayView A library that allows you to creat

Amit Krishna A 10 May 12, 2022
Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling.

Android Week View Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling. Fea

Raquib-ul Alam (Kanak) 3.4k Jan 3, 2023
A Material design back port of Android's CalendarView

Material Calendar View A Material design back port of Android's CalendarView. The goal is to have a Material look and feel, rather than 100% parity wi

Prolific Interactive 5.8k Jan 5, 2023
Pick a date or time on Android in style

Material DateTime Picker - Select a time/date in style Material DateTime Picker tries to offer you the date and time pickers as shown in the Material

null 4.7k Jan 4, 2023
[NO LONGER MAINTAINED] Android library for better Picker DialogFragments

/!\ This Project is no longer maintained /!\ DialogFragments modeled after the AOSP Clock and Calendar apps to improve UX for picking time, date, numb

Code-Troopers 2.7k Dec 29, 2022
A better calendar for Android

Caldroid Caldroid is a fragment that display calendar with dates in a month. Caldroid can be used as embedded fragment, or as dialog fragment. User ca

Roomorama 1.4k Jan 5, 2023
Android time range picker

TimeRangePicker TimeRangePicker is a library which can be used to select a time range. WARNING Requires android-support-v4 Description This library pr

Titto Jose 422 Nov 10, 2022
Android calendar view inspired by Sunrise calendar and iOS7 stock calendar

SilkCal Android calendar view inspired by Sunrise calendar and iOS7 stock calendar. Usage Add compile 'me.nlmartian.silkcal:library:0.1.1' to your dep

JunGuan Zhu 385 Nov 25, 2022
An alternative DatePicker for Android

Copyright (C) 2011 Daniel Berndt - Codeus Ltd - DateSlider 1.1 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this

Ben Demboski 240 Nov 25, 2022
an android open source timer

TimerView ENGLISH README 重要的事情 由于使用了MaskFilter,辉光效果必须[关闭硬件加速](http://blog.chenming.info/blog/2012/09/18/android-hardware-accel/)!! 由于使用了MakskFilter,辉光

iamnull 277 Nov 28, 2022
FlipTimerView library for Android

FlipTimerView Preview FlipTimerView library for Android Getting started Add it in your root build.gradle at the end of repositories: allprojects { re

Anu S Pillai 314 Dec 28, 2022
Easy-to-use animated clock icon for Android

Timecon Easy-to-use animated clock icon written in Kotlin Including in your project Add to your root build.gradle: allprojects { repositories {

Alexey Derbyshev 262 Dec 9, 2022
[NO LONGER MAINTAINED] Android library for better Picker DialogFragments

/!\ This Project is no longer maintained /!\ DialogFragments modeled after the AOSP Clock and Calendar apps to improve UX for picking time, date, numb

Code-Troopers 2.7k Dec 29, 2022
an android open source timer

TimerView ENGLISH README 重要的事情 由于使用了MaskFilter,辉光效果必须[关闭硬件加速](http://blog.chenming.info/blog/2012/09/18/android-hardware-accel/)!! 由于使用了MakskFilter,辉光

iamnull 277 Nov 28, 2022
A material-styled android view that provisions picking of a date, time & recurrence option, all from a single user-interface.

SublimePicker A customizable view that provisions picking of a date, time & recurrence option, all from a single user-interface. You can also view 'Su

Vikram 2.3k Jan 4, 2023