package student.sol.ImagEx1;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;

public class ImageEx1Activity extends Activity implements OnClickListener {
    /** Called when the activity is first created. */
  
	 ImageView iv;
     Button bt1;
     Button bt2;
    
	
	@Override
    public void onCreate(Bundle savedInstanceState)  {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
       // iv=(ImageView) findViewById(R.id.imageView1);
        iv=(ImageView) findViewById(R.id.imageView1);
        bt1=(Button)findViewById(R.id.button1);
        bt2=(Button)findViewById(R.id.button2);
     
          bt1.setOnClickListener(this);
          bt2.setOnClickListener(this);
          
    }


	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
	if(v.getId()==R.id.button1){
			iv.setImageResource(R.drawable.nmms_215646753);
		}else if(v.getId() == R.id.button2){
			iv.setImageResource(R.drawable.daum5_115446_0t);
		}
	}
}