AlertDialog customized (OK button Size, color change)
refer to MultiMetronome.app
android.support.v7.app.AlertDialog.Builder builder = new android.support.v7.app.AlertDialog.Builder(mActivity);
View theView = View.inflate(mContext, R.layout.wheel_view, null);
builder.setView(theView)
.setPositiveButton("OK가 크게",new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// ToDo
}
})
.setNegativeButton("No", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) { }
});
final android.support.v7.app.AlertDialog dialog = builder.create();
dialog.setOnShowListener( new DialogInterface.OnShowListener() {
@Override
public void onShow(DialogInterface arg0) {
dialog.getButton(AlertDialog.BUTTON_POSITIVE).setTextColor(Color.BLACK);
dialog.getButton(AlertDialog.BUTTON_POSITIVE).setTextSize(24);
}
});
dialog.show();
'android source ' 카테고리의 다른 글
To know whether SD card is mounted (0) | 2019.09.29 |
---|---|
Horizontal Wheel (0) | 2019.09.06 |
tts speak (0) | 2019.08.17 |
mp3 media play (0) | 2019.08.17 |
To get the Camera full folder name (0) | 2019.08.17 |