如何在启动3次后显示AltertDialog? 我只知道如何在应用程序中(我与Android和Sharedpreferences初学者)第一次启动做一些事情:在应用程序启动3次后显示AlertDialog
if (settings.getBoolean("my_first_time", true)) {
Log.d("Comments", "First time");
// Action which is done at first launch
// save first launch
settings.edit().putBoolean("my_first_time", false).commit();
} else {
//not first time
}
感谢的,菲利克斯
你到目前为止试过的felix? –
我是初学者,所以我只在第一次使用sharedpreferences时工作过一次。 – Seilbahn
每次显示时,增加并保存到sharedpref并在显示之前读取 – nomag