Modify the Android EditText cursor color:
QQ group: 372135639
EditText has one property: android:textCursorDrawable This property is used to control the color of the cursor
android:textCursorDrawable= ”@The function of “null” and “@ null” is to make the cursor color the same as text color
Android set EditText cursor color and thickness:
In the Android input box, if you want to change the color and thickness of the cursor, you can do it in the following two steps:
1. Create a new cursor control color in the resource file drawable_ cursor.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<size android:width="1dp" />
<solid android:color="#008000" />
</shape>
Set the EditText cursor to show/hide
android:cursorVisible= ”True “//displays
the android:cursorVisible= ”False “//hide
Note: default display
//The cursor displays the problem by default. It will not be displayed by default on Meizu mx6. (it is better to control the display and hiding of cursor by code)
Read More:
- Android solves the gliding problem of EditText
- Android learning — cannot resolve symbol ‘EditText‘
- Android monitor EditText text input EditText monitor events and input events
- Android studio displays the class and method where the cursor is located
- Linux use ls to view the file color is all white solution, and Linux file color introduction
- Android project error Error:found an Invalid color. Solution
- Hide print button when printing page in front end
- Cursor window allocation of 2048 kb failed
- Linux command line cursor moving skills
- The problem of cursor skipping in wangeditor
- Android get screen width and height and get control width and height
- Resolve call‘ plt.show () ‘no image after
- Idle line number setting and linenumbers modification
- TypeError: object of type ‘Cursor‘ has no len()
- Unity Cursor Lock& Camera Lock
- Invalid normalized color error in unity
- Error: typecheck; offendingcommand: Show
- Ubutnu’s idea input method candidate box can’t follow the cursor
- Error: Error parsing D:\new_android\Android SDK\system-images\android-25\android-wear\armeabi-v7a\de
- How do I change the default background color of all FIGURE objects created in MATLAB