Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>if I understand your problem you have 3 button that you want after clicking all of them see value in another activity, so you must put all three value into intent.use following code:</p> <pre><code>Intent intent = new Intent(MainActivity.this,Ostanovki.class); buttonvis1 = (Button) findViewById(R.id.button1); buttonvis2 = (Button) findViewById(R.id.button2); buttonvis2.setVisibility(Button.GONE); buttonvis1.setOnClickListener(new OnClickListener(){ public void onClick(View v){ intent.putExtra("in1",input_in.getText().toString()); intent.putExtra("out1", input_out.getText().toString()); buttonvis2.setVisibility(Button.VISIBLE); //startActivity(intent); } }); buttonvis3 = (Button) findViewById(R.id.button3); buttonvis3.setVisibility(Button.GONE); buttonvis2.setOnClickListener(new OnClickListener(){ public void onClick(View v){ intent.putExtra("in2",input_in.getText().toString()); intent.putExtra("out2", input_out.getText().toString()); buttonvis3.setVisibility(Button.VISIBLE); startActivity(intent); } }); buttonvis3.setOnClickListener(new OnClickListener(){ public void onClick(View v){ intent.putExtra("in3",input_in.getText().toString()); intent.putExtra("out3", input_out.getText().toString()); //startActivity(intent); } }); </code></pre> <p>and in second activity you must get data so use following code:</p> <pre><code> Bundle bundle = getIntent().getExtras(); String in1= bundle.getString("in1"); String out1= bundle.getString("out1"); String in2= bundle.getString("in2"); String out2= bundle.getString("out2"); String in3= bundle.getString("in3"); String out3= bundle.getString("out3"); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload