中的应用程序时,获得相同的复选框状态我有一个列表视图。当我检查时,我收到复选框。 但我想重新启动应用程序时得到相同的状态。如果有什么办法,请回复我。 我对android非常陌生。 我的代码如下:当我重新启动Android
protected void onListItemClick(ListView l, View v, int position, long id) {
super.onListItemClick(l, v, position, id);
getListView().setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
//I am getting status of check box here. If I click on file check box is appearing to me. //I want to be store always for true.
String keyword = value[position];
mediaPlayer.reset();
try
{
mediaPlayer.setDataSource("/sdcard/"+keyword+".mp4");
mediaPlayer.prepare();
mediaPlayer.start();
}
catch(Exception e)
{
e.printStackTrace();
}
}
在此先感谢。
请尝试下面的链接http://developer.android.com/guide/topics/data/data-storage.html#pref – ingsaurabh