I am basically trying to set an image to an ImageView which is an item in a ListView. The listview contains items that has ImageViews in them. I am trying to change the Imageview of the first item in that list.
crop_doneBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
final Bitmap croppedImage = CropImageView.getCroppedImage();
//Instance of the adapter
ProfileAdapter adapter =
new ProfileAdapter(EyewerProfile.this,
listData) {
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View view = super.getView(position, convertView, parent);
//The ImageView I need
ImageView userpic = (ImageView) view.findViewById(R.id.userpic);
userpic.setImageBitmap(croppedImage);
return view;
}
};
}
});
This doesn't do anything and the imageview of the item doesn't change and it doesn't crash either. Am I doing it right?