Category : android-gallery

All I want is that my app photos can be visible both in phone gallery and inside my app. I want to show all previous images made from my app and do it like this (I removed some code about populating recyclerView to amke it more readable): @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ..

Read more

I am trying to display all user video thumbnails from local gallery in recyclerview but it loads thumbnails very slow (it takes almost 10 seconds to load all video thumbnails). Code provided below: VideoGalleryAdapter.java: public class VideoGalleryAdapter extends RecyclerView.Adapter<VideoGalleryAdapter.viewHolder> { public OnItemClickListener onItemClickListener; Context context; ArrayList<VideoGalleryModel> videoArrayList; public VideoGalleryAdapter(Context context, ArrayList<VideoGalleryModel> videoArrayList) { this.context = ..

Read more

I don’t know what is wrong with this code, please let me know where I am going wrong here. this is button code activityMainBinding.btnUpload.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent gallery = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); startActivityForResult(gallery, IMG_RESULT); } }); and this is onActivityResult code @Override protected void onActivityResult(int requestCode, int resultCode, @Nullable ..

Read more

I’m creating a gallery app in android studio. I have to set image and image captured date in one single recycler view like this image……..see this is example image and i want like this… suggests me like what should I write in onBindViewHolder()…. MainActivity.java public class MainActivity extends AppCompatActivity { private RecyclerView recyclerView; @RequiresApi(api = ..

Read more

I am developing a camera application that taking images / photos, saves them in the external storage and show them in a gallery. I accomplished it but when I stepping into the gallery everything is extremely slow. here is the code that load the files from external storage : //LOAD ALL FILES FROM A SPECIFIC ..

Read more

In my Android app, I allow the user to select a picture from their gallery for their profile picture. This is the code for selecting an image from their gallery: profile_image_view.setOnClickListener { val intent = Intent(Intent.ACTION_PICK) intent.type = "image/*" startActivityForResult(intent, PROFILE_REQUEST_CODE) } This is the code for my onActivityResult: override fun onActivityResult(requestCode: Int, resultCode: Int, ..

Read more

I wish to load images from Gallery in my CustomView without altering their aspect ratio, and then I wish to draw on it. I have a custom view which I added dynamically from MainActivity like this: @Override protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { super.onActivityResult(requestCode, resultCode, data); if(data!=null && requestCode==PICK_PHOTO_CODE) { Uri ..

Read more