android-gallery

Gallery with folder filter

回眸只為那壹抹淺笑 提交于 2019-11-26 17:46:11
I'm using following code to open a gallery inside of my app Intent intent = new Intent(Intent.ACTION_GET_CONTENT); intent.setType("image/*"); startActivityForResult(intent, FIND_RESULT); Is it possible to limit a list of images to only show images taken by camera? Viewing Gallery on my 2.1 system, images are grouped so there has to be a parameter that defines to which folder it belongs. Checking the MediaStore.Images.ImageColumns I did not a find any column that would define such thing. Could I be wrong? Because if I could create a query to filter by folder and create my own gallery view, then

android circular gallery?

断了今生、忘了曾经 提交于 2019-11-26 17:44:24
问题 I am a newbie to android development.Now i would like to do gallery view as circular like image as below.The things is that i want to enlarge the center image when user scroll from left to right and right to left. Is there any tutorials for that ? what I want is the image that's been swiped need to be enlarged while it's at the center. I thought I could do it with Gallery. but the example from the android developer is not the one I want. :( 回答1: If you want to enlarge the center selected

upload picture to emulator gallery

与世无争的帅哥 提交于 2019-11-26 16:00:15
问题 I want to add picture in emulator's gallery. But i am not able to do this. How to do this? any clue! Though i have gone through a answer posted in stack over flow but didn't get success with that answer. 回答1: Check this Once you have a virtual SD card in your emulator, if you're not comfortable with mtools or if you don't know how to mount a loopback device on Linux (which is really easy by the way), just use adb push to upload your images. Possible example: adb shell mkdir /sdcard/Pictures

Loading all the images from gallery into the Application in android

谁说我不能喝 提交于 2019-11-26 15:25:15
问题 I am creating an application wherein I need all the images in the gallery into my application that has a girdview in it. I want all the images from all the folders to appear in the gridview. String[] proj = { MediaStore.Images.Media.DATA, MediaStore.Images.Media._ID }; actualimagecursor = managedQuery(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, proj, null, null, MediaStore.Images.Media.DEFAULT_SORT_ORDER); actual_image_column_index = actualimagecursor.getColumnIndexOrThrow(MediaStore.Images

Android getting an image from gallery comes rotated

折月煮酒 提交于 2019-11-26 15:19:22
问题 I am trying to let users select a profile picture from gallery. My issue is that some pictures come as rotated to the right. I start the image picker like so: Intent photoPickerIntent = new Intent(); photoPickerIntent.setType("image/*"); photoPickerIntent.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(Intent.createChooser(photoPickerIntent, "Select profile picture"), Global.CODE_SELECT_PICTURE); I get the image from onActivityResult like so: Uri selectedPicture = data.getData();

How to open one particular folder from gallery in android?

馋奶兔 提交于 2019-11-26 14:31:23
问题 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, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); intent.setType("image/*"); startActivityForResult(Intent.createChooser(intent, "Pick any photo"), SELECT_IMAGE_FROM_GALLERY_CONSTANT); 回答1: Hi Please use this following code . you will get particular folder image . code : import

How to pick image for crop from camera or gallery in Android 7.0?

耗尽温柔 提交于 2019-11-26 13:08:27
问题 Pick image for crop from gallery and camera it\'s done for below Android 7.0 but in Android Nought it crashes in camera. I use fileprovider for it but doesn\'t work. MainActivity.java public class MainActivity extends AppCompatActivity implements View.OnClickListener { private Button mBtn; private Context context; private static final int SELECT_PICTURE_CAMARA = 101, SELECT_PICTURE = 201, CROP_IMAGE = 301; private Uri outputFileUri; String mCurrentPhotoPath; private Uri selectedImageUri;

How to access an image from the phone's photo gallery?

☆樱花仙子☆ 提交于 2019-11-26 11:04:23
问题 By any chance, does anyone know how to access the phone\'s photo gallery? I am making an application that takes a picture of a plant leaf and analyzes the image to determine whether or not it is determine. We were hoping that we could give the user two options of taking the picture of the leaf or using an image of a leaf that the user has already taken. However, we got the picture taking part, but we do not know how to access the photo gallery. 回答1: You have to launch the Gallery App using

Android - Save images in an specific folder

人走茶凉 提交于 2019-11-26 10:32:15
问题 I need to save the pictures taken with my app in an specific folder. I\'ve read many solutions to this problem but I couldn\'t make any of them work so I ask for help. MainActivity.java public void onClick(View v) { Intent camera = new Intent( android.provider.MediaStore.ACTION_IMAGE_CAPTURE); //Folder is already created String dirName = Environment.getExternalStorageDirectory().getPath() + \"/MyAppFolder/MyApp\" + n + \".png\"; Uri uriSavedImage = Uri.fromFile(new File(dirName)); camera

How to implement HorizontalScrollView like Gallery?

大憨熊 提交于 2019-11-26 07:57:31
问题 I want to implement Horizontal ScrollView with some features of Gallery, In Gallery the scroll made at some distance it arrange in pair, i.e If we have three images shown in screen, clicking last image will arrange at center. How would I implement HorizontalSCrollView as mentioned? 回答1: Try this code: activity_main.xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout