현재 활동의 버튼을 누를 때 다음 활동의 배경을 변경하고 싶습니다. & 32 개의 버튼이 있으며 모두 동일한 활동으로 이동하지만 원하는 작업 다음 활동에 색상에 관한 정보를 보내 그것은 내가 이것을 시도 32 배를 변경할 수 있도록 버튼 prees에 따라 그것의 다시 땅을 변경하지만 의도와 함께현재 활동의 버튼을 누를 때 다음 활동 배경을 변경하는 방법
buttons[0].setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent myIntent = new Intent(Sori.this,listnameseries.class);
myIntent.putExtra("namemovies","fattetl3bet");
startActivity(myIntent);
buttons[0].setBackgroundResource(R.drawable.back1);
}
});
buttons[1].setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent myIntent = new Intent(Sori.this,listnameseries.class);
myIntent.putExtra("namemovies","sikkarwasat");
startActivity(myIntent);
buttons[0].setBackgroundResource(R.drawable.back254);
}
});
buttons[2].setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent myIntent = new Intent(Sori.this,listnameseries.class);
myIntent.putExtra("namemovies","superfamily");
startActivity(myIntent);
buttons[0].setBackgroundResource(R.drawable.back2978);
}
});
buttons[3].setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent myIntent = new Intent(Sori.this,listnameseries.class);
myIntent.putExtra("namemovies","wiladaminalkhasira1");
startActivity(myIntent);
buttons[0].setBackgroundResource(R.drawable.back27);
}
});
buttons[4].setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent myIntent = new Intent(Sori.this,listnameseries.class);
myIntent.putExtra("namemovies","wiladaminalkhasira2");
startActivity(myIntent);
buttons[0].setBackgroundResource(R.drawable.back280);
}
});
buttons[5].setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent myIntent = new Intent(Sori.this,listnameseries.class);
myIntent.putExtra("namemovies","wiladaminalkhasira3");
startActivity(myIntent);
buttons[0].setBackgroundResource(R.drawable.back278);
}
});
buttons[6].setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent myIntent = new Intent(Sori.this,listnameseries.class);
myIntent.putExtra("namemovies","zamanlbarghout1");
startActivity(myIntent);
buttons[0].setBackgroundResource(R.drawable.back278);
}
});
buttons[7].setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent myIntent = new Intent(Sori.this,listnameseries.class);
myIntent.putExtra("namemovies","zamanlbarghout2");
startActivity(myIntent);
buttons[0].setBackgroundResource(R.drawable.back278);
}
});
buttons[8].setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent myIntent = new Intent(Sori.this,listnameseries.class);
myIntent.putExtra("namemovies","ta7ounalchar1");
startActivity(myIntent);
buttons[0].setBackgroundResource(R.drawable.back2896);
}
});
buttons[9].setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent myIntent = new Intent(Sori.this,listnameseries.class);
myIntent.putExtra("namemovies","ta7ounalchar2");
startActivity(myIntent);
buttons[0].setBackgroundResource(R.drawable.back287);
}
});
buttons[10].setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent myIntent = new Intent(Sori.this,listnameseries.class);
myIntent.putExtra("namemovies","sar5troo7");
startActivity(myIntent);
buttons[0].setBackgroundResource(R.drawable.back2879);
}
});
buttons[11].setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent myIntent = new Intent(Sori.this,listnameseries.class);
myIntent.putExtra("namemovies","sabaya1");
startActivity(myIntent);
buttons[0].setBackgroundResource(R.drawable.back2789);
}
});
buttons[12].setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent myIntent = new Intent(Sori.this,listnameseries.class);
myIntent.putExtra("namemovies","sabaya2");
startActivity(myIntent);
buttons[0].setBackgroundResource(R.drawable.back234);
}
});
buttons[13].setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent myIntent = new Intent(Sori.this,listnameseries.class);
myIntent.putExtra("namemovies","sabaya3");
startActivity(myIntent);
buttons[0].setBackgroundResource(R.drawable.back2435);
}
});
buttons[14].setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent myIntent = new Intent(Sori.this,listnameseries.class);
myIntent.putExtra("namemovies","sabaya4");
startActivity(myIntent);
buttons[0].setBackgroundResource(R.drawable.back2345);
}
});
buttons[15].setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent myIntent = new Intent(Sori.this,listnameseries.class);
myIntent.putExtra("namemovies","sabaya5");
startActivity(myIntent);
buttons[0].setBackgroundResource(R.drawable.back2435);
}
});
buttons[16].setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent myIntent = new Intent(Sori.this,listnameseries.class);
myIntent.putExtra("namemovies","sana3oud");
startActivity(myIntent);
buttons[0].setBackgroundResource(R.drawable.back2345);
}
});
buttons[17].setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent myIntent = new Intent(Sori.this,listnameseries.class);
myIntent.putExtra("namemovies","ta7tasama2alwatan");
startActivity(myIntent);
buttons[0].setBackgroundResource(R.drawable.back2435);
}
});
buttons[18].setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent myIntent = new Intent(Sori.this,listnameseries.class);
myIntent.putExtra("namemovies","natrin");
startActivity(myIntent);
buttons[0].setBackgroundResource(R.drawable.back26546);
}
});
buttons[19].setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent myIntent = new Intent(Sori.this,listnameseries.class);
myIntent.putExtra("namemovies","7oudoudchakika");
startActivity(myIntent);
buttons[0].setBackgroundResource(R.drawable.back2546);
}
});
buttons[20].setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent myIntent = new Intent(Sori.this,listnameseries.class);
myIntent.putExtra("namemovies","yasmin3atik");
startActivity(myIntent);
buttons[0].setBackgroundResource(R.drawable.back2546);
}
});
buttons[21].setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent myIntent = new Intent(Sori.this,listnameseries.class);
myIntent.putExtra("namemovies","znoodelset");
startActivity(myIntent);
buttons[0].setBackgroundResource(R.drawable.back2546);
}
});
buttons[22].setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent myIntent = new Intent(Sori.this,listnameseries.class);
myIntent.putExtra("namemovies","l3btmoot");
startActivity(myIntent);
buttons[0].setBackgroundResource(R.drawable.back25464);
}
});
당신이 버튼의 배경 자원 [0을 설정하는 이유 ] "Sori"의 인스턴스에 대한 백그라운드 리소스를 변경해야하는 경우? myIntent.putExtra를 사용하여 색상을 보낸 다음 활동 초기화시 처리하는 것이 어떻습니까? –