How can i convert this code so i can get the row from list view

后端 未结 1 1673
梦如初夏
梦如初夏 2021-01-28 16:24

I want to be able to fetch a row from a list view and populate textViews in a different activity. I want to be able to do this onclick of an item with the list view..



        
相关标签:
1条回答
  • 2021-01-28 16:54

    try like this

    public void onListItemClick(ListView parent, View v, int position, long id) {
       String string = from[position]);  // this depends on your Adapter ...
       Intent i = new Intent(CheckData.this,ShowData.class);
       i.putExtra("SELECTED", string);
       startActivity(i);
    

    i got it from this link , it will be use full for you : Use of SQLite

    0 讨论(0)
提交回复
热议问题