Giter Club home page Giter Club logo

scrollablenumberpicker's Issues

Question

Hi! I use create the component via Java and I need to change the color of the arrows and the text appearance (app:snp_value_text_appearance)

How can I do that ?

Thanks!

Databinding support needed

Support to databinding will be great!

I had to create a DataAdapter to overcome this.
Publishing here if anyone needs

public class ScrollableNumberPickerBindingAdapters {

    @BindingAdapter(value = "selectedValueAttrChanged")
    public static void setListener(com.michaelmuenzer.android.scrollablennumberpicker.ScrollableNumberPicker picker, final InverseBindingListener listener) {
        if (listener != null) {
            picker.setListener(new ScrollableNumberPickerListener() {
                @Override
                public void onNumberPicked(int value) {
                    listener.onChange();
                }
            });
        }
    }

    @BindingAdapter("selectedValue")
    public static void setSelectedValue(com.michaelmuenzer.android.scrollablennumberpicker.ScrollableNumberPicker picker, int value) {
        if (picker.getValue() != value) picker.setValue(value);
    }


    @InverseBindingAdapter(attribute = "selectedValue")
    public static int getSelectedValue(com.michaelmuenzer.android.scrollablennumberpicker.ScrollableNumberPicker picker) {
        return picker.getValue();
    }

}

Usage:

<com.michaelmuenzer.android.scrollablennumberpicker.ScrollableNumberPicker
android:id="@+id/picker1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:selectedValue="@={item.Number}"
/>

Text color

Text color is not getting changed
I have passed color in all possible different ways in xml :
numberpicker:snp_value_text_color="#fff"
numberpicker:snp_value_text_color="#ffffff"
numberpicker:snp_value_text_color="@android:color/white"
numberpicker:snp_value_text_color="@color/white"

could not set text color in java file

Question

is it possible to change the icons size ? att

onClickListener

Is it possible to attach a clicklistener to the view, and change de valeu on a dialog?

Enable type number as TextView

Salam.
How can we use this library to type number for large range?
For example for min:0 to max 2000, using buttons and scroll is difficult and we need to type number.

Question

Is it possible to format the number? I want to use two pickers to change the value of a float. One for the part left of the point and one for the decimal part. And the decimal part should step from 00 to 95 with steps of 5.
I also would like to rotate, so when you plus on the max value you go to min value...
Aside from those "issues" I like the control!!!

listener not public

I try to import ScrollableNumberPickerListener but get a 'is not public, Cannot be accessed outside package' message. I use version 0.2. I assume I need the listener to capture value changes

setTextSize

Hi,

can you please add a new feature like setTextSize for Text?

( ScrollableNumberPicker.java -> mValueTextView.setTextSize(30); )

Viele Grusse aus Dortmund

thanks
e. kaplaN

Unit names

It would be nice if we can set a unit next to the number. Basically, i want to show multiple pickers that show different units for the same value.
<< 60 % >>
<< 50 px >>

Question: Text

are you able to add functionality to use .setDisplayedValues to set the values to a String[]?

Buttons automatically move according to the number of digits

Is there any way to set fixed margin between the buttons and value? I don't like that the buttons move automatically when the number of digits is changed.
For example, if the current number is 9 and the user press on the increase icon, the buttons would move automatically because of the "valueMarginStart" "valueMarginEnd" values.

Question: Access through code

Hi there!
Awesome idea this. I have a problem though. I am trying to set min, max and value through code but i keep getting Null Pointer Exception. When i set it in XML it works fine. This is what i try:

npYob.setValue(1971);

This is what i get:
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.michaelmuenzer.android.scrollablennumberpicker.ScrollableNumberPicker.setValue(int)' on a null object reference

Question: Big icons

Hi! I placed in all drawable folder, two icons of 64 * 64 but in the app the size is the same whatever the icons files is placed

What I can I do if I want bigs icons on the selectors ?

Thanks a lot!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.