How to change the floating label color of TextInputLayout and the cursor, without changing colorAccent in AppTheme 2. ![]() Cant change cursor and bubble color for Material TextInputEditText. EditText cursor and pointer color for below android 5.0. Relevant Android source code inside Editor. Change EditText Cursor color through styles.xml. Then in your edittext, just specify android:textCursorDrawable: This will make a 2dip wide red cursor that is I usually end up using negative bottom padding to shorten the cursor because the it drops too low below baseline when you increase the line height with lineSpacingMultiplier or lineSpacingExtra. Try to add android:imeOptions'actionNext' to EditText. Nevertheless, Huawei P9 Lite still not able to take effect even cursor color with your code, but LG Nexus 5X no problem. User positive bottom padding to move the bottom of your cursor lower This only able to change cursor (vertical line) color, not including pointer (water shape) color. ![]() Use positive top padding to move the top of your cursor higher Note: only works on API 12 and greater due to support for textCursorDrawable I had to dig far into the Android source to find the answer to this, but you essentially have to use padding on a custom shape drawable.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |