alertDialog
エミュレーターまたはデバイスでアプリケーションを強制終了したとき、およびそのデバイスまたはエミュレーターでアプリケーションに移動してアプリケーションを再度起動したときに、別の問題が発生しましたalertDialog
。少し前に、このリンクでこれと同様の問題がありましたアラートダイアログの共有設定により、アプリケーションが応答しなくなり、すべての問題が完全に解決されたと思いました。誰かがこの問題について私を助けてくれますか。
final SharedPreferences settings = getSharedPreferences("pref_name", 0);
("installed", false);
final AlertDialog.Builder alertDialog = new AlertDialog.Builder(this);
alertDialog.setTitle("Title");
alertDialog.setIcon(R.drawable.ic_launcher);
alertDialog.setAdapter(new MyAdapter(), null);
alertDialog.setPositiveButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
SharedPreferences.Editor editor = settings.edit();
editor.putBoolean("installed", true);
editor.commit();
}
});
alertDialog.show();
さらに詳しく説明する必要がある場合はお知らせください