我正在尝试更改“警报对话框”中EditText闪烁的光标颜色,因为这不是我想要的。颜色是蓝绿色,我要白色。我没有做任何改变。这就是我的意思 ] https://github.com/JeffreyWay/laravel-mix/blob/master/docs/options.md
这就是我所拥有的...
Java代码:
public void alertDialogWithText(){
AlertDialog.Builder adb = new AlertDialog.Builder(new ContextThemeWrapper(MainActivity.this, R.style.EditTextAlertDialog));
adb.setTitle("Title");
inputET = new EditText(this);
inputET.setInputType(InputType.TYPE_CLASS_TEXT);
inputET.setTextColor(getResources().getColor(android.R.color.white));
adb.setView(inputET);
adb.setPositiveButton("OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
adb.show();
}
Colors.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#303030</color>
<color name="colorPrimaryDark">#000</color>
<color name="colorAccent">#fff</color>
</resources>
Styles.xml:
<style name="EditTextAlertDialog">
<item name="android:textColor">@android:color/white</item>
<item name="android:background">#444</item>
</style>