I am working on Android Smart TV application:
In a view
there is a custom keyboard and an EditText
.
When application launches focus goes to the keyboard.
Desired:
editText
.How can I show this effect inside the EditText
?
Say in your xml's edittext section, add android:paddingLeft="100dp" This will move your start position of cursor 100dp right from left end. Same way, you can use android:paddingRight="100dp" This will move your end position of cursor 100dp left from right end.
To hide the cursor we implement this method for each Edit Text: “setCursorVisible(false)”
This happens if you set a background for the field. If you want to solve this, set the cursorDrawable
to @null
.
You should add textCursorDrawable
with cursorVisible
.
Reference to a drawable that will be drawn under the insertion cursor.
android:cursorVisible="true" android:textCursorDrawable="@null"
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