passing data from list view to another activity

前端 未结 6 2079
再見小時候
再見小時候 2020-12-18 15:23

i want to create an activity, in which, i would like to have a listview, there can be about 20-30 items in a list view,on tapping any particular value in listview, it should

6条回答
  •  北海茫月
    2020-12-18 16:07

    There are two ways:

    1. Pass it into Intent

      intent.putExtra("jobNo", item.jobNo);
      
    2. Use Application scope

      ((MyApplication) getApplication()).setJobNo(item.jobNo);
      

提交回复
热议问题