Get data from another activity

后端 未结 3 1807
没有蜡笔的小新
没有蜡笔的小新 2020-12-09 13:10

Still working on my skills in android.

My problem here is that i have a label from my database that contain a name that is in a spinner, when i click on the label, a

3条回答
  •  暖寄归人
    2020-12-09 13:31

    You have to pass the information as extras.

    Passing the Information

    Intent i = new Intent();
    i.setClassName("com.example", "com.example.activity");
    i.putExtra("identifier", VALUE);
    startActivity(i);
    

    Getting the Information

    Bundle extras = getIntent().getExtras();
    String exampleString = extras.getString("identifier");
    

提交回复
热议问题