如何在啓動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