我有一个班子有两个县,这些县将你送至同一个班级,但取决于所敦促的纽顿会显示不同的文字/影印/布顿。
So right now when a button is pressed it send you to the next class and adds some intets, like this:
button1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Bundle bundle1 = new Bundle();
bundle1.putInt("top", R.drawable.1);
bundle1.putInt("mid", R.drawable.2);
bundle1.putInt("bot", R.drawable.3);
Intent intet1 = new Intent(curclass.this, nextclass.class);
intent1.putExtras(bundle1);
startActivity(intent1);
在接下来的班级,我每个县都有一个dle子,但我是活着的。
So how do I make the "if" thing? I have tried but I don t know what to put after "if". Something like
"if (button1 = pressed)
(do this)
else if (button2 = pressed)
(do this)"
提前感谢!
如果我像一个多面解释,或许是因为我是一派,我刚刚开始方案。
EDIT:问题在于,我在第二次活动中有两个 b子:
Bundle asd = getIntent().getExtras();
int asdasd = asd.getInt("top");
im1 = (ImageView) findViewById(R.id.imagetop);
im1.setImageResource(newimage);
bu1 = (Button) findViewById(R.id.buttontop);
bu1.setText("blahblah");
而我有中间和下层,然后是第二大dle,从纽顿向内人讲述什么图像/文字,问题在于,即使我新闻纽特,第二大 b子仍然uff着。 我怀疑,这是由 b子与告诉他们要做的事情相伴造成的。
I hope that clears it up :)