Questions tagged [android-gallery]

Questions regarding using Android gallery application. Gallery application is the official media app installed on all Android mobile devices. The app allows browsing, organizing, sharing and editing of media (photos and videos).

Gallery application is the official media app installed on all Android mobile devices. The app allows browsing, organizing, sharing and editing of media (photos and videos).

Reference: Android Developers Gallery class overview

1181 questions
6
votes
3 answers

Identify in onActivityResult if image was selected from gallery or video was selected - Android

I am using following code to select a image or video from gallery : imgGallery.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Intent pickPhoto = new…
rahul
  • 1,095
  • 8
  • 22
6
votes
1 answer

How to take screenshot of a layout in android

I want to save my frame layout into gallery by taking the screen shot of the layout. This code works on a project(Name: Trial), but when I tried the same code on othe project(Name: Fg), It did not work. The photo is not being saved in the…
Adistark
  • 63
  • 1
  • 1
  • 5
6
votes
6 answers

select image from gallery not working in Fragment Class in Android

Select Image from Gallery inside Fragment Class is not working. I tried more stacks code. if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) { Intent intent = new Intent(); intent.setType("image/*"); …
harikrishnan
  • 1,985
  • 4
  • 32
  • 63
6
votes
2 answers

Captured image was not showing in gallery but it stored successfully in sdcard

I am new to android development, i am doing small application to capture USB Camrea image using UVCCamera. I have captured image using UVCCamera and stored in sdcard like this File filepath = new…
iosLearner
  • 1,312
  • 1
  • 16
  • 30
6
votes
2 answers

Select Multiple Images Using GalleryView

I was just wondering if Android had built in code so that I could select multiple images in a gallery-view and then have those images exported as filenames in a string array(ex /sdcard/~f1.jpg, /sdcard/~f2.jpg,...). Again any help is appreciated!…
hwrdprkns
  • 7,525
  • 12
  • 48
  • 69
6
votes
3 answers

Save image from ImageView to device gallery

I'm trying to save an image from ImageView to devices gallery. I tried this code Code Edit: URL url = new URL(getIntent().getStringExtra("imageURL")); File f = new File(url.getPath()); addImageToGallery(f.getPath(), this); public…
Eladit
  • 168
  • 1
  • 2
  • 9
6
votes
3 answers

What is MINI_THUMB_MAGIC and how to use it?

Background I've noticed a weird column for MediaStore.Images.ImageColumns called "MINI_THUMB_MAGIC" . the documentation says just that : The mini thumb id. Type: INTEGER Constant Value: "mini_thumb_magic" The question my guess is that this field…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
6
votes
1 answer

Instant upload and Google+ images in my app

I am currently running into the following problem: When I want to retrieve an image from the gallery I use the following code to start the intent for the gallery. public void useGallery() { this.intentbasedleave=true; Intent intent = new…
Jeroen
  • 727
  • 1
  • 9
  • 20
6
votes
1 answer

android:selecting multiple images in gallery and starting implicit intent

How to get the image path of all the selected images or just display them in my app? I am able to start my implicit intent and display it in my imageView when a user selects image in gallery and press share button like shown below ImageView…
6
votes
2 answers

ClassCastException: AbsListView$LayoutParams cannot be cast to Gallery$LayoutParams

I'm trying to develop an Android 3.1 tablet application. This app will have a lot of images, and I have followed Processing Bitmaps Off the UI Thread tutorial, but I've done something wrong because I get: java.lang.ClassCastException:…
VansFannel
  • 45,055
  • 107
  • 359
  • 626
6
votes
1 answer

How to open one particular folder from gallery in android?

I'am uing the below code to open the android default gallery app. It opens all the image folders under sdcard. How can i open only one particular folder? Intent intent = new Intent(Intent.ACTION_PICK,…
Santhosh
  • 4,956
  • 12
  • 62
  • 90
6
votes
3 answers

Selection of multiple images from gallery view

I want to create a gallery view, in which I want to select multiple images using an orange rectangular box. It should look something like the following: screen look like https://i.stack.imgur.com/FsNAa.jpg
Ashish Dwivedi
  • 8,048
  • 5
  • 58
  • 78
5
votes
4 answers

How to Increase the size of Image View in Android

I am working on a project that requires me to implement two horizontal scroll views with an image view in between them. I would like to extend the size of the image view to fill up the gap in between the scroll view. I went through the sample code,…
user707165
5
votes
1 answer

saving picture to shared pictures folder android target api 29

My goal is to Request picture from Camera app, save it in my app data and also write the same picture to Gallery so if user deletes app it still has the taken pictures (unlike messenger our utility tool pictures are considered highly valuable to…
Alpha
  • 1,754
  • 3
  • 21
  • 39
5
votes
3 answers

android gallery view "stutters" with deferred image loading adapter

I would like to create an deferred loading adapter for use with a Gallery widget. That is to say getView() returns an ImageView immediately, and later some other mechanism will asynchronously call its setImageBitmap() method. I did this by creating…
Jeffrey Blattman
  • 22,176
  • 9
  • 79
  • 134