简体   繁体   中英

Android:How to setSelection() in ListActivity

I have a Class which extends ListActivity, and is called by Activity_1.

ListActivity contains the listview with CheckedTextView.

When i select a row in listview, it should show a CheckedTextView and pass the data to Activity_1 and should remember the selected row.

The selected CheckedTextView should be shown when Activity_1 calls ListActivity again ?

getListView().setSelection(int);

再次调用时,您始终可以将记住的项目传递回ListActivity。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM