I have an imageview
with a default image, I want when user click the imageview to open an image selector then he selects his image from sdcard then the image is being on the imageview,
this is my imageview
xml
<ImageView
android:id="@+id/ivImage"
android:layout_width="100dip"
android:layout_height="100dip"
android:layout_marginLeft="10dip"
android:contentDescription="@string/iv_undefinedImage"
android:src="@drawable/undefinedimage" />
Java
ImageView iv ;
iv_image = (ImageView)findViewById(R.id.iv_signup_image);
iv_image.setOnClickListener(this);
public void onClick(View v) {
switch (v.getId()) {
case R.id.iv_signup_image:
break;
}