【发布时间】:2014-11-17 17:09:31
【问题描述】:
在android中我们可以通过以下方式改变光标颜色:
android:textCursorDrawable="@drawable/black_color_cursor"。
我们如何动态地做到这一点?
在我的情况下,我已将可绘制光标设置为白色,但我需要更改为黑色怎么办?
// Set an EditText view to get user input
final EditText input = new EditText(nyactivity);
input.setTextColor(getResources().getColor(R.color.black));
【问题讨论】:
-
关注this link,最好的选择。