ai212983 / android-spinnerwheel Goto Github PK
View Code? Open in Web Editor NEWWheel-like spinner widget for Android
Home Page: http://git.io/spinwheel
License: Apache License 2.0
Wheel-like spinner widget for Android
Home Page: http://git.io/spinwheel
License: Apache License 2.0
I wanted to know how I can use this library if my data comes from a SQLite database?
Due to the lack of min and targetSdkVersion definition in AndroindManifest.xml the library adds the unwanted permission to apps during the build process.
Here is the debug output of merging Manifests:
android:uses-permission#android.permission.READ_PHONE_STATE
IMPLIED from AndroidManifest.xml:2:1 reason: antistatic.spinnerwheel has a targetSdkVersion < 4
When I change current item before it will show on the screen, getWidth() return 0. It's a bug or feature? How to avoid that?
Can be seen in "password" section of the demo app. Scrolling after shuffling behaves weird.
Hi,
this library is really good job! Looks and feels very nice.
I was thinking that would be nice to provide possibility for user to enter the value in the wheel manually using keyboard. NumberPicker in Android SDK allows to double click on it and shows keyboard for user to provide a number.
That would be a great feature.
Kind regards, Konrad
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.
Spinners not Rotate in Spin Wheel
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
Implement styling following features:
AbstractWheel wheelHorizontalView1 = (AbstractWheel) findViewById(R.id.wheelHorizontalView1);
NumericWheelAdapter minAdapter = new NumericWheelAdapter(this, 1, 15,
"%01d");
minAdapter.setItemResource(R.layout.wheel_text_centered_dark_back);
minAdapter.setItemTextResource(R.id.text);
wheelHorizontalView1.setViewAdapter(minAdapter);
I added this, Now how to get selected text.
Please, refer to this question,
http://stackoverflow.com/questions/29886579/how-to-get-selected-text-using-android-spinner-wheel
Got above error when using:
final AbstractWheel BpmWheel = (AbstractWheel) findViewById(R.id.bpmWheel);
NumericWheelAdapter hourAdapter = new NumericWheelAdapter(this, 0, 23, "%02d");
hourAdapter.setItemResource(R.layout.wheel_text_centered);
hourAdapter.setItemTextResource(R.id.text);
BpmWheel.setViewAdapter(hourAdapter);
Copied from Demo.
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).
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. ๐
Can you tell me how to change the theme to the original theme of the wheel demo "https://code.google.com/p/android-wheel/".
Hi!
Thanks for a great wheelwidget! Looking forward to see the new version coming up!
I have a wheel constructed in onCreate like this:
final AbstractWheel BpmWheel = (AbstractWheel) findViewById(R.id.bpmWheel);
final NumericWheelAdapter bpmAdapter = new NumericWheelAdapter(this, 10, 300, "%02d");
bpmAdapter.setItemResource(R.layout.wheel_text_centered2);
bpmAdapter.setItemTextResource(R.id.text);
BpmWheel.setViewAdapter(bpmAdapter);
BpmWheel.setCurrentItem(pos);
How can I change the pos outside the onCreate??
I am trying to call BpmWheel.setCurrentItem(pos) in another method but AndroidStudio mark it like error...
Sorry if this is a dumb question....I am rather new at programming.
I created an WheelAdapter with 5 item array 'x', after i set array 'y' with 3 items , the view is showing 4 items, the last item is from array 'x'.
x => ["a", "b", "c", "d", "e"]
y => ["1", "2", "3"]
final result in view ["1", "2", "3", "d"], and "d" is not selectable
Hello
I'd like to ask, if its easy to modify the wheel that it looks like in Android 4 before/after scrolling?
e.g.
no scrolling: < 6 |7| 8 >
while scrolling: 4 5 |6| 7 8
I would thank you for a small hint, what to modify where. I look in the AbstractWheel and AbstractWheelView but I couldn't solve it on my own.
But anyway. A great lib!
Cheers
FelixGroup
Hello!
I tried to compile the demo and get several errors.
What I have done:
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.
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
It seems that there is no license specified in this project.
I would like to use this project for an android app but i can use it only when it have a license.
So would you add a license like Apache 2.0 / MIT
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)
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!
At first thanks for this great library!
Is there a method or are there lines in the code to modify to disable or adjust the amount of overscrolling.
regards,
David
When using separators on Gingerbread devices the draw code in WheelHorizontalView::drawItems()
(and probably other classes as well) won't stick to the bounding rect. This is because Gingerbread ignores setBounds()
when calling draw()
.
Error:A problem occurred configuring project ':app'.
Artifact 'android-spinnerwheel.jar (com.github.ai212983:android-spinnerwheel:bba368d940)' not found.
Searched in the following locations:
https://jitpack.io/com/github/ai212983/android-spinnerwheel/bba368d940/android-spinnerwheel-bba368d940.jar
Not sure what to do (newbie), followed instructions at Android Arsenal.
Using Android Studio 1.1.0
I am not able to add a click listener on item in a vertical wheel.. I mean: I want to implement a spinner wheel in which some items are clickable and others not. When the users scroll on the right item they also confirm their choice by clicking on the item. When they confirm, the view pager automatically swype on the Summary section.
Not all the items are clickable, this is clickable:
This is not clickable:
I tried to add a click listener on my custom item but it doesn't work. I tried also to use OnWheelClickedListener but it is not for the current item but for the others..
The library is well documented but I find nothing that can help me, how could I do?
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
and I want to be like this,i.e, 5 items should be visible
Can you please help me on this, where I am going wrong ?
How to call Listeners for WheelHorizontalView like OnWheelChangedListener???
I m not able to do so..
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
Recycling all item helps, but not sure its correct approach
Remove unused features, add missing. We need to demo the following functionality:
Hi Guys,
Just wondering is it possible to set a start value for the NumericWheelAdapter using a hour_horizontal layout?
I have a range of values from -100 to 100 and would like to set the starting position of the wheel at 0, would this be possible?
getItem should return a model object
getView should return the view!
Why is the view set for the developer instead of letting the developer make the view?!
Why is it getViewAdapter and not getAdapter
Why is it setViewAdapter and not setAdapter ?!
how to use this library in my project in eclipse. I tried by adding the jar files to the libs folder and then and then added to the build path but i could not access the classes in my main activity.
Hi, im having a issue with this project in eclipse.
I import the project via (android: import existing code into workplace) but when I try to add the project as a library to my dependent project it doesn't appear under ( properties -> android -> Libraries -> Add ).
How do I correctly use this as a library in my project?
Any help is appreciated.
Thanks
Trying to add dependecies on android studio and its not syncing with my gradle...
I'm using OnWheelClickedListener on WheelHorizontalView, the item before and after the current item is getting clicked but the current one isn't, below is what I mean, what should I do ?
The reason I'm looking for this is because I'm trying to open another activity when the wheel is clicked
before | current | after
When I click before or after I get the the index of each one, but when I click the "current" I only get the debuggin stuff you are doing on WheelHorizontalView on line 210
public class TimePickerCustomViewsActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.time_picker_custom);
final AbstractWheel wheel = (AbstractWheel) findViewById(R.id.ampm);
wheel.addClickingListener(click);
ArrayWheelAdapter<String> ampmAdapter = new ArrayWheelAdapter<String>(
this, new String[] { "01", "02", "03" });
ampmAdapter.setItemResource(R.layout.wheel_text_centered);
ampmAdapter.setItemTextResource(R.id.text);
wheel.setViewAdapter(ampmAdapter);
wheel.addClickingListener(click);
wheel.addScrollingListener(scrolledListener);
wheel.setCyclic(true);
wheel.setInterpolator(new AnticipateOvershootInterpolator());
}
OnWheelScrollListener scrolledListener = new OnWheelScrollListener() {
public void onScrollingStarted(AbstractWheel wheel) {
Log.i("TAG", "onScrollingStarted");
}
public void onScrollingFinished(AbstractWheel wheel) {
Log.i("TAG", "onScrollingFinished "
+ getWheel(R.id.ampm).getCurrentItem());
}
};
OnWheelClickedListener click = new OnWheelClickedListener() {
public void onItemClicked(AbstractWheel wheel, int itemIndex) {
Log.i("TAG", "onItemClicked " + itemIndex);
}
};
private AbstractWheel getWheel(int id) {
return (AbstractWheel) findViewById(id);
}
}
Hi,
could I write ideas in "Issues"?
Should I only use one issue and add ideas in the same issue?
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
Is there a click event for the WheelHorizontalView?
For example when I click on day 17 in "Time picker with custom views" nothing happens. I want if I click on day 17 that day 17 is selected.
(In "Time picker" is it working)
Nevermind, I found it:
OnWheelClickedListener click = new OnWheelClickedListener() {
public void onItemClicked(AbstractWheel wheel, int itemIndex) {
hours.setCurrentItem(itemIndex, true);
}
};
hours.addClickingListener(click);
If all items are shown even so the last item is blinkin'. Failed to investigate the real reason, but maybe something with a too early recycling mechanism?
Video: http://ge.tt/1wFMqoa/v/0?c
When the project is checked out into Eclipse, it is named "library," which is not very helpful. The "name" attribute in the .project file could be changed to something like "android-spinnerwheel"
When wheel is autocorrecting (snapping to some value), opacity incorrectly blinks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.