TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
romasha ali
NA
94
38.3k
selected image not showing in imageview
Jan 4 2018 6:18 AM
i set breakpoint but could not get the problem.. Could you please sort this out..I need to submit my project tonight..
MY COde:
Button buttonLoadImage = (Button) findViewById(R.id.button4);
buttonLoadImage.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v)
{
Intent i = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(i, Selected_image);
}
});
}
protected void onActivityResult(int requestCode, int resultCode , Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == Selected_image && resultCode == RESULT_OK && null != data) {
Uri selectedImage = data.getData();
String[] filePathColumn = { MediaStore.Images.Media.DATA };
Cursor cursor = getContentResolver().query(selectedImage,
filePathColumn, null, null, null);
cursor.moveToFirst();
int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
String picturePath = cursor.getString(columnIndex);
cursor.close();
ImageView imageView = (ImageView) findViewById(R.id.image_view);
imageView.setImageBitmap(BitmapFactory.decodeFile(picturePath));
}
}
Reply
Answers (
2
)
xamarin form cros platform
i cant add .db to xamarin.