먼저 EditText 로 정수 데이터를 받구요.

 

이 데이터를 다른 Activity로 넘길려는데

 

EditText 입력하고 버튼 클릭하면 멈추더라구요.

 

제 생각에는 형변환중에 문제가 있는거 같은데...        

 

이거 전에도 int 형을 String으로 안바꾸고 그냥 넘기니 중간에 멈추더라구요.

 

보내는 Activity

 

EditText weight;

...

 

launch01.setOnClickListener(new View.OnClickListener() {
   
   public void onClick(View v) {
    int choiceexer = 0;   // 조깅 선택시 choiceexer =0
    
    String cho_intent = String.valueOf(choiceexer);
    String weight_intent = String.valueOf(weight);
    
    // TODO Auto-generated method stub
    Intent intent = new Intent(choExercise.this, runExercise.class);
    
    intent.putExtra("cho_intent", cho_intent);
    intent.putExtra("weight_intent", weight_intent);
    
    startActivity(intent);
   }
  });

 

받는  Activity

     int weight02 = 0;
    
     Intent intent = getIntent();
     String choiceexer01 = intent.getStringExtra("cho_intent");
     String weight01 = intent.getStringExtra("weight_intent");
    
     choiceexer02 = Integer.valueOf(choiceexer01);
     weight02 = Integer.valueOf(weight01);  // 요넘 추가하니 강종 되네요.
     
     TextView tvchoiceexer = (TextView)findViewById(R.id.Choiceexer);
     tvchoiceexer.setText(getString(R.string.loc_choiceexer) + " " + choiceexer02 );
    
     TextView tvweight = (TextView)findViewById(R.id.Weight);
     tvweight.setText(getString(R.string.loc_weight) + " " + weight02);