I wanted to display blinking cursor at the end of the text in TextView .
I tried by android:cursorVisible=\"true\"
in TextView But no go .
Even i t
First of all you should use EditText
in place of TextView
for taking input. If still the cursor doesn't blink, set the android:cursorVisible="true"
attribute in xml file
, it should make the cursor blink. If your cursor is not visible in edit text, that's also a reason one can't see the cursor blinking. Set android:textCursorDrawable="@null"
. This should solve your problem
In your activity class, add this code as well.
EditText input = (EditText)findViewById(R.id.edittext1);
input.setSelection(input.getText().length());