ScansActivity.java 文件源码

java
阅读 28 收藏 0 点赞 0 评论 0

项目:spidey 作者:
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setTitle(R.string.history_of_spidey_scans);

    mDb = DatabaseHelper.getInstance(this);
    List<Scan> scans = mDb.getAllScans();

    mListView = getListView();

    //add on long click listener to start action mode
    getListView().setOnItemLongClickListener(new OnItemLongClickListener() {
        @Override
        public boolean onItemLongClick(AdapterView<?> adapterView, View view, int position, long id) {
            onListItemCheck(position);
            return true;
        }
    });

 // use the SimpleCursorAdapter to show the
    // elements in a ListView
    ScanAdapter adapter = new ScanAdapter(this,scans);
    setListAdapter(adapter);

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号