mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-29 04:17:12 +01:00
Select or capture image in PostGalleryActivity.
This commit is contained in:
parent
4f4dc821d4
commit
a610be7d16
@ -378,7 +378,10 @@ public class PostGalleryActivity extends BaseActivity implements FlairBottomShee
|
||||
}
|
||||
|
||||
public void selectImage() {
|
||||
|
||||
Intent intent = new Intent();
|
||||
intent.setType("image/*");
|
||||
intent.setAction(Intent.ACTION_GET_CONTENT);
|
||||
startActivityForResult(Intent.createChooser(intent, resources.getString(R.string.select_from_gallery)), PICK_IMAGE_REQUEST_CODE);
|
||||
}
|
||||
|
||||
public void captureImage() {
|
||||
|
@ -121,6 +121,9 @@ public class RedditGallerySubmissionRecyclerViewAdapter extends RecyclerView.Ada
|
||||
}
|
||||
|
||||
public void addImage(String imageUrl) {
|
||||
if (redditGalleryImageInfoList == null) {
|
||||
redditGalleryImageInfoList = new ArrayList<>();
|
||||
}
|
||||
redditGalleryImageInfoList.add(new RedditGalleryImageInfo(imageUrl));
|
||||
notifyItemInserted(redditGalleryImageInfoList.size() - 1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user