sephiroth74 / androidwheel Goto Github PK
View Code? Open in Web Editor NEWCustom wheel widget for android
Custom wheel widget for android
Thank you for making this very useful widget. I need to set its starting position to something other than halfway - e.g. the total range is 0 to 100, but I want it to start at 30 rather than 50.
How can this be done?
there is no main class it.sephiroth.test.test.MainActivity
Hey there! I just imported this project to Eclipse to use it as library, but when I added this library to my project, a lot of errors appeared suddenly in my project... Errors were like this: R cannot be resolved to a variable. So, which is the correct way to import android wheel?
Using the setvalue
method gives me a divide by zero
exception.
My code is as follows:
mWheel = (Wheel) v.findViewById(R.id.wheel);
mWheel.setOnScrollListener( new Wheel.OnScrollListener() {
@Override
public void onScrollStarted( Wheel view, float value, int roundValue ) {
Log.i("SPINZ", "STARTED: f: " + value + " / i: " + roundValue);
}
@Override
public void onScrollFinished( Wheel view, float value, int roundValue ) {
Log.i("SPINZ", "FINISHED: f: " + value + " / i: " + roundValue);
roundValue *= -1;
roundValue += 40;
if (roundValue >= 0 && roundValue < sections.length)
mSectionTV.setText(sections[roundValue]);
}
@Override
public void onScroll( Wheel view, float value, int roundValue ) {
roundValue *= -1;
roundValue += 40;
if (roundValue >= 0 && roundValue < sections.length)
mSectionTV.setText(sections[roundValue]);
}
} );
mWheel.setValue(1.0f, true);
If I take mWheel.setValue(1.0f, true)
and move it to right after mWheel = (Wheel) v.findViewById(R.id.wheel)
, then I don't get the divide by zero exception, but the method doesn't do anything either.
mWheel.setValue(1, false)
seems not work in onCreate
, but in OnScrollListener
it works fine.
Is there any way to put numbers to wheel instead vertical lines?
Do you have any samples??
Your wheel looks great & funny.
But, I must set API to >= 9 when build because in Wheel.java line 1084 you define a OverScroller (which only from API 9+). This mean I cannot run this app on Android 2.1 and 2.2.
Can you take time to add support for 2.1 and 2.2?
Thanks.
Could you tell me how to use it?
Specifically, I'm trying to move the lines
sephiroth:numRotations="2"
sephiroth:ticks="20"
to code, so that I can externalize the wheel and change it at will in my app. However, I can't find a way to control these via java rather than xml.
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.