Hi, following is my project code import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.ImageButton; import android.widget.ImageView;
//this is code for first activity, in which i take 4 buttons public class PpppActivity extends Activity { /** Called when the activity is first created. */ ImageButton btn1=(ImageButton) findViewById(R.id.imageButton1); ImageButton btn2=(ImageButton) findViewById(R.id.imageButton2); ImageButton btn3=(ImageButton) findViewById(R.id.imageButton3); ImageButton btn4=(ImageButton) findViewById(R.id.imageButton4); Activity1 ac1=new Activity1(); @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); btn1.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub Activity1.getInstanceCount(); ac1.getIv(); ac1.iv.setImageResource(R.drawable.apple); } }); } } * * //This is second activity, where i take one imageview, n on that want to display differnt images one for each button click public *class* Activity1 *extends* Activity{ /** Called when the activity is first created. */ *final* ImageView iv=(ImageView) findViewById(R.id.*imageView1*); @Override *public* *void* onCreate(Bundle savedInstanceState) { *super*.onCreate(savedInstanceState); setContentView(R.layout.*main11*); } *public* ImageView getIv() { *return* iv; } } On Tue, Oct 25, 2011 at 2:48 PM, Ratheesh Valamchuzhy <android...@gmail.com>wrote: > hi > > give ur project file > > thnks > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- รป Consider the environment. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en