-3
public TextView textView;
public TextView textView1;

//Bank bank = new Bank();

// public int myNumber1;
//public int myNumbe


@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
    textView = (TextView) findViewById(R.id.textView17);
    textView1 = (TextView) findViewById(R.id.textView18);

    int element = Integer.parseInt(textView.getText().toString());
    final int element1 = element * 3;

    textView1.setText("" + element1);

    fab.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            Intent intent = new Intent(MainActivity.this, Bank.class);
            startActivity(intent);
        }

    });
}
Kapil G
  • 4,081
  • 2
  • 20
  • 32

1 Answers1

0

First - as others have said in comments, please put more information so others can help you. Looks like these are the controls/variables you are trying to share with other classes

public TextView textView;
public TextView textView1;
int element;

You can pass these into another class via

  • Constructor arguments
  • Methods
  • Public fields (i personally don't prefer this)
James Poulose
  • 3,569
  • 2
  • 34
  • 39