Hello,
I'm creating an app with a customised numberpicker. The customisation is
done by extending numberpicker widget and updating view. My main wish is to
set a bigger font for text in picker.
private void updateView(View view) {
if(view instanceof EditText){
((EditText) view).setTextSize(30);
((EditText)
view).setTextColor(getResources().getColor(R.color.mp_white));
((EditText) view).setFocusable(false);
}
}
The content of my picker is an array of strings I create in advance and
then set it as values for picker.
timePicker.setMinValue(0);
timePicker.setMaxValue(values.length - 1);
timePicker.setWrapSelectorWheel(false);
timePicker.setDisplayedValues(values);
But now I'm having a weird problem, at first the numberpicker was allowed
to wrap the selector wheel and the size of the of text was 42, but now as
I've disabled the wrap I had to make the text smaller or else it gets stuck
on first and last value.
It looks like that when I scroll to edge values inside picker it scrolls
over them and so it is needed to scroll some time in the other direction
before it switches to second from first (or last-1 from last value).
So I would like to know if there is any way to make the font bigger and
prevent this glitch. Is it maybe something in connection of rowheight that
when I change the font size it doesn't detect correct scrolling?
Thank you for any help.
--
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/dc5030ee-8409-4d73-a65e-cc8fedb92375%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.