How to take NumberPicker values set by user?

91 Views Asked by At

So I am working on my first app and I have some problems trying to take the values set by the user on two number pickers in one screen.

Here is the code for that screen.

    NumberPicker np =(NumberPicker)findViewById(R.id.piker);
    final String[] vrednosti= {"никогаш","ретко","секој ден"};
    np.setMinValue(0);
    np.setMaxValue(vrednosti.length-1);
    np.setDisplayedValues(vrednosti);
    np.setWrapSelectorWheel(false);
    np.setValue(1);

    NumberPicker np2 =(NumberPicker)findViewById(R.id.piker2);
    np2.setMinValue(40);
    np2.setMaxValue(150);
    np2.setWrapSelectorWheel(false);
    np2.setValue(60);

I want to take the values so that I can use them in my calculator.

0

There are 0 best solutions below