我想切换布局自定义列表视图。我可以使用更多时间setAdapter()吗? 我需要刷新活动吗?
测试:
if (stateEdit == false)
{
bEdit.setText("Edit");
//lvContent.setVisibility(View.GONE);
//lvContent2.setVisibility(View.VISIBLE);
viewContentAdapter = new ViewContentAdapter(this,
R.layout.view_note_text, viewNote2);
lvContent.setAdapter(viewContentAdapter);
viewContentAdapter.notifyDataSetChanged();
//startActivity(starterIntent); finish();
}
else
{
bEdit.setText("Save");
//lvContent2.setVisibility(View.GONE);
//lvContent.setVisibility(View.VISIBLE);
viewNoteAdapter = new ViewNoteAdapter(this,
R.layout.view_note_check_edit, viewNote);
lvContent.setAdapter(viewNoteAdapter);
viewNoteAdapter.notifyDataSetChanged();
//startActivity(starterIntent); finish();
}