SQLite的小例子--备忘录(12)
来源:未知 责任编辑:责任编辑 发表时间:2014-01-20 07:51 点击:次
for (int i=0; i<mCategory.getCount();i++){
String s = (String) mCategory.getItemAtPosition(i);
Log.e(null, s +" " + category);
if (s.equalsIgnoreCase(category)){
mCategory.setSelection(i);
}
}
mTitleText.setText(todo.getString(todo
.getColumnIndexOrThrow(MyAdapter.KEY_SUMMARY)));
mBodyText.setText(todo.getString(todo
.getColumnIndexOrThrow(MyAdapter.KEY_DESCRIPTION)));
}
}
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
saveState();
outState.putSerializable(MyAdapter.KEY_ROWID, mRowId);
}
@Override
protected void onPause() {
super.onPause();
saveState();
}
@Override
protected void onResume() {
super.onResume();
populateFields();
}
private void saveState() {
String category = (String) mCategory.getSelectedItem();
String summary = mTitleText.getText().toString();
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>