【发布时间】:2012-01-19 10:38:48
【问题描述】:
我想从自定义选项卡重新加载我的活动。活动主要包括其中的一个列表视图以及如何再次加载它。任何 sn-ps 或示例代码都会有所帮助。我已经尝试了所有与重新加载相对应的事情Android 中的一项活动,我想了解有关自定义选项卡的信息。谢谢。
listContent = (ListView)findViewById(R.id.contentlist);
mySQLiteAdapter = new SQLAdapter(this);
mySQLiteAdapter.openToWrite();
cursor = mySQLiteAdapter.queueAll();
String[] from = new String[]{SQLAdapter.YMM,SQLAdapter.SS}
int[] to = new int[]{R.id.ymm,R.id.ss};
cursorAdapter =
new SimpleCursorAdapter(this, R.layout.row, cursor, from, to);
listContent.setAdapter(cursorAdapter);
listContent.setOnItemClickListener(listContentOnItemClickListener);
cursorAdapter.getCursor().requery();
cursorAdapter.notifyDataSetChanged();
【问题讨论】: