Reputation: 13545
The problem is there is a edittext and I would like to set it default has a cursor on it (but not focus and hide the keyboard )
try
android:textCursorDrawable="@null"
android:cursorVisible="true"
<EditText
android:id="@+id/comment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="1dp"
android:background="@drawable/comment"
android:hint="@string/cmt"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:textColor="#AAACAD"
android:textColorHint="#AAACAD"
android:textCursorDrawable="@null"
android:cursorVisible="true"
android:textSize="15sp" />
but not works. Please help. Thanks a lot
Upvotes: 1
Views: 1128
Reputation: 816
@user782104
You can use this attribute android:windowSoftInputMode="stateHidden"
in your AndroidManifest.xml
file where you declare that Activity.
so this way cursor will be in edittext but keyboard will not display.
Upvotes: 5