AlertDialogue
テーマを設定するか、の変更を背景色に設定します。アラートダイアログの背景テーマ/色
デフォルトのテーマがありますが、別のバージョンでは異なるテーマになっていますので、すべてのバージョンで修正したいと思っています。
それとも単に白
@NonNull
public Dialog onCreateDialog(Bundle savedInstanceState) {
final SimpleAdapter adapter = new SimpleAdapter(getContext(), imagesWithNames, R.layout.lib_dialog_image,
new String[]{"name", "imageID","Spacing"}, new int[]{R.id.text1, R.id.image1,R.id.spacing});
return new AlertDialog.Builder(getContext()).setAdapter(adapter,
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
((PlaceCallActivity) getContext()).OnSelected(WithNamesFragment.this.getClass(), (int) ((HashMap<String, Object>) adapter.getItem(i)).get("imageID"));
}
}).setCancelable(true).setTitle("PICK YOUR AVATAR").setNegativeButton("Cancel",new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
}).create();
}
と背景色を変更するには、あなたのコードを投稿しないでください、私はここに変更を加える必要がある場所を教えてください。
AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(this, R.style.AlertDialogCustom));
注:上記の行は、それを行うだろうが、私は私のAlertDialogue
あなたはまだ解決策をお探しですか? –
はい私はまだ1つを見つけませんでした! – SamH67
これを参照してくださいhttp://stackoverflow.com/questions/2422562/how-to-change-theme-for-alertdialog –