2
我刚看到这篇文章(How can I change the color of AlertDialog title and the color of the line under it),我怀疑我的标题是否有变量......我如何使用第一个解决方案来更改颜色?当我使用变量时,改变alertDialog标题的颜色字符串
这是我的代码:
AlertDialog.Builder dialogo = new AlertDialog.Builder(ListadoBC.this);
dialogo.setTitle("¡"+listaBC.get(arg2).getFragilidad()+" !\n"+"¿Ha seguido esta recomendación?");
而且我想,这句话("¡"+listaBC.get(arg2).getFragilidad()+" !\n")
显示为红色,使用这样的事情()alert.setTitle(Html.fromHtml("<font color='#FF7F27'>Set IP Address</font>"));
...这可能吗?
你真的尝试过'Html.fromHtml()'吗? – Karakuri
@Karakuri这是可能的,否则不创建自定义alertDialog? – wiki