I'm using the NumberPicker under the Android SDK level 13 inside a fragment. Works fine, but each time the activity is started the cursor is blinking behind the number. How can I get rid of the blinking cursor, I don't know why this widget has the focus. This is the xml of the NumberPicker:
<NumberPicker android:id="@+id/timer_picker_hrs"
android:layout_width="wrap_content" android:layout_height="wrap_content" />
I get this solution from somewhere but I don't remember from where. This works good for me, just do this in your activity.
myNumberPicker.setDescendantFocusability(NumberPicker.FOCUS_BLOCK_DESCENDANTS);
You can also set this in XML:
android:descendantFocusability="blocksDescendants"
(Borzh comment)
One way of removing the blinking cursor is disabling the soft keyboard for the NumberPicker. (refer to: Disable soft keyboard on NumberPicker )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With