milosmns / actual-number-picker Goto Github PK
View Code? Open in Web Editor NEWAndroid: A horizontal number picker
License: GNU General Public License v3.0
Android: A horizontal number picker
License: GNU General Public License v3.0
I can't access the setters for maximum and minimum range.
here is the relevant portion of my XML
<me.angrybyte.numberpicker.view.ActualNumberPicker
android:id="@+id/my_account_card_month_picker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="22.5dp"
android:layout_weight="1"
android:layerType="software"
app:show_bars="false"
app:max_value="12"
app:min_value="1"
app:show_controls="true"
app:show_fast_controls="false"
app:show_text="true"
app:text_color="@android:color/black"
app:text_size="16sp" />
<me.angrybyte.numberpicker.view.ActualNumberPicker
android:id="@+id/my_account_card_year_picker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layerType="software"
app:show_bars="false"
app:max_value="12"
app:min_value="1"
app:show_controls="true"
app:show_fast_controls="false"
app:show_text="true"
app:text_color="@android:color/black"
app:text_size="16sp" />
</LinearLayout>
here is my build.gradle
android {
compileSdkVersion 23
buildToolsVersion "24.0.1"
defaultConfig {
applicationId "android.fusionofideas.com.uscca"
minSdkVersion 17
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.2.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.android.gms:play-services-base:9.8.0+'
compile 'com.google.android.gms:play-services-location:9.8.0+'
compile 'com.google.android.gms:play-services-maps:9.8.0+'
compile 'com.koushikdutta.ion:ion:2.1.9'
compile 'se.emilsjolander:stickylistheaders:2.7.0'
compile 'com.github.barteksc:android-pdf-viewer:2.4.0'
compile 'com.github.delight-im:Android-SimpleLocation:v1.0.1'
compile 'com.github.arimorty:floatingsearchview:2.0.3'
compile 'me.angrybyte.picker:picker:1.2.0'
}
can you help me? I am using your software in an aar generated from the github source
thank you
Hi @milosmns,
Is it possible to add a step size attribute, so when I set min to 0 and max to 100, and set step size to 5, then numbers 5,10,15,20... etc are selected, rather than all numbers from 0 to 100.
Thanks
picker.setWrapSelectorWheel(false);
When using number picker with high range values like years, max value is always selected.
Setup used:
<me.angrybyte.numberpicker.view.ActualNumberPicker
android:id="@+id/actual_picker"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:background="@color/PrimaryColor"
app:bar_color="@android:color/white"
app:bar_width="1dp"
app:bars_count="10"
app:controls_color="@android:color/white"
app:draw_over_controls="true"
app:draw_over_text="false"
app:fast_controls_color="@android:color/darker_gray"
app:highlight_color="@color/PrimaryColor"
app:max_value="2016"
app:min_value="2000"
app:selection_color="@color/PrimaryColor"
app:show_bars="true"
app:show_controls="false"
app:show_fast_controls="false"
app:show_highlight="true"
app:show_text="true"
app:text_color="@android:color/white"
app:text_size="16sp"
app:value="2008" />
ActualNumberPicker.java, line 682:
mValue = (int) Math.floor(percent * mMaxValue + mMinValue);
new value is being calculated assuming mMinValue will be zero or close to zero?
Hi, thank you for this great component.
Did you remember about extension of values for float type?
we can't handle onValueChanged while using multiple ActualNumberPicker! adding tag some thing to listener will help !!
Awesome library thanks !!
As your slow arrow move with speed of 1 i want it to move with speed of 0.1
and fast arrow with speed of 1.
how can i change this.
when i change the value the text is still not changed
Hi,
inside the onValueChanged(int oldValue, int newValue), is there a way to discern if a change to the value has been made by "touching" the number picker o by the line code numberPicker.setValue(value)?
I don't know if this is the best solution, but I used the numberPicker.setOnTouchListener() to change the value of a boolen variable, so that I can know when the user touch the picker and so the value will be changed in that way.
Thanks
Had a couple of duplicate definitions when I tried to include your numberpicker library (min_value, max_value and bar_color). Haven't messed around with libraries much. Can you give me some idea on how what I could modify to solve the problem?
In no way, the control is being expanded to its parent width. Nothing works in the layout_width, even not hard coded dps. It only spans a little part of the parent width in a Linear Layout which has orientation vertical.
If I just touch the view at for example half, it will set the value to 50 or (which is half). The correct behavior for this half visible (moving cycle) as visible from the display is, to change value on its movement or dragging.
No matter where I touch, it should change the value according to the dragging distance,only when I drag. Even If I touch near end and move to half, and say I dragged for value 20, it should change the existing 50 value to 30. 50-20 = 30
.
I did make one ListView and inflated the ActualNumberPicker on Adapter. Did works fine on Android 4.1.2, but on Android 6.0 doesn't is shown nothing.
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.