[android-developers] how to make cursor blink ( appear) when edit text gets focus.
we have two edit texts, one for width and one for height, XML below. I'm able through the xml make it so if you hit next in width the focus goes to height. Programmaticly by using postdelayed i can change like 100ms after they hit enter ( if they don't have next on phone) focus to move to high entry and this moving of focus is all working. the problem is either way i change focus when the high entry gets focus you must trust it has focus. there is no visible blinking cursor on getting focus to clue you in. the cursor doesn't appear till you start typing. Actually it works the same way if you just start out and click wide, the wide entry text area doesnt have a blinking cursor till you type. But at least in that case you know where the focus is because you clicked. Any way to make the cursor blink on getting focus? i googled for some ideas, one was use setSelection. this didn't work.
<EditText android:id="@+id/entryWide"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#fff"
android:layout_margin="10dp"
android:singleLine="true"
android:layout_below="@id/test_image"
android:layout_alignParentLeft="true"
android:padding="15dp"
android:nextFocusDown="@+id/entryHigh"
android:imeOptions="actionNext"
android:cursorVisible="true"
/>
<EditText android:id="@+id/entryHigh"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#fff"
android:layout_margin="0dp"
android:layout_alignBottom = "@+id/entryWide"
android:layout_toRightOf = "@+id/widthHeightseperator"
android:singleLine="true"
android:cursorVisible="true"
android:padding="15dp"
/>
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home