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);
}
});
}
答案 0 :(得分:0)
首先 - 正如其他人在评论中所说,请提供更多信息,以便其他人可以帮助您。 看起来这些是您尝试与其他类共享的控件/变量
public TextView textView;
public TextView textView1;
int element;
您可以通过
将这些传递到另一个班级