设置特定的edittext在进入页面时光标闪烁

Set specific edittext has cursor blinking when enter the page

问题是有一个编辑文本,我想将它设置为默认有一个光标(但不是焦点和隐藏键盘)

尝试

          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" />

但不起作用。请帮忙。非常感谢

@user782104
您可以在声明 Activity.

AndroidManifest.xml 文件中使用此属性 android:windowSoftInputMode="stateHidden"

所以这样光标将在编辑文本中,但键盘不会显示。