我正在尝试将颜色设置为具有绿色和红色的正负按钮,并为按钮中的文本设置一些字体。你能告诉我这是怎么做到的吗?
public void onClick(View v) {
// TODO Auto-generated method stub
switch (v.getId()){
case R.id.bNewTicket:
// custom dialog
LayoutInflater li = LayoutInflater.from(context);
final View promptsView = li.inflate(R.layout.homepagedialognewticket, null);
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context);
alertDialogBuilder.setView(promptsView);
// set dialog message
alertDialogBuilder.setPositiveButton("Go", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,int id) {
}
})
.setNegativeButton("Back",new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,int id) {
}
});
AlertDialog alertDialog = alertDialogBuilder.create();
alertDialog.show();
break;
}
}