How to pass value using Intent between Activity in Android?

前端 未结 7 1475
面向向阳花
面向向阳花 2020-12-01 16:48

I want to pass the value of the position in one activity class to another...

My code is as follows:

protected void onListItemClick(ListView listView,         


        
相关标签:
7条回答
  • 2020-12-01 17:47
    Bundle extras = getIntent().getExtras();
    
    if (extras != null) { 
        String data = intent.getExtras().getString("key").toString();
    }
    
    0 讨论(0)
提交回复
热议问题