Closed davidbeloo closed 8 years ago
Hi @davidbeloosesky
I am trying to load an image into the cropview but it does not show up. I pass a string extra to my crop image activity.
I then try to load it into the cropview using the following
@AfterViews
void setupUI() {
if (getIntent().getExtras() != null) {
if (getIntent().getExtras().getString(KEY_IMAGE_FILE_PATH) != null) {
cropView.extensions()
.load(Uri.fromFile(new File(getIntent().getStringExtra(KEY_IMAGE_FILE_PATH))));
}
}
}
The value of the string on debugging is
/storage/emulated/0/Pictures/PrismApp/Current/96adeca7-79a3-4cf9-bc1c-8c736bb26ee2.jpg
Why does the image not show up? Am I using the api wrong or is it a bug?
@davidbeloosesky as @lexer demonstrated you can only load Bitmaps from a model e.g. a File, Uri, String, etc. We don't have a camera view at the moment.
@rohanmahale there is no need for Uri.fromFile
part just providing a File
should suffice, also make sure you have read permission. Please create a separate issue if you still can't load your file.
@davidbeloosesky