PutExtra doesn't work on the retriever side

前端 未结 4 1195
借酒劲吻你
借酒劲吻你 2021-01-07 06:18

I want to sent intent from one first activity to another.

The first activity sends an intent to the second activity in order to create a new AlertDialog, receive a n

4条回答
  •  庸人自扰
    2021-01-07 06:49

    try this way

      int data1,data2;
      Bundle extra=getIntent().getExtras();
      if(extra!=null){
      data1=extra.getInt("data1");
      data2=extra.getInt("data2");
      }
    

提交回复
热议问题