gallery

Pick multiple images from gallery

烈酒焚心 提交于 2019-12-08 06:22:30
问题 How to read/retrieve paths or Uri[] when I select multiple images from gallery? I want to call this: Uri[] originalUri = data.getData(); But in reality I'm getting this only, fetching only one Uri : Uri originalUri = data.getData(); 回答1: @RIT as said by you that you want to get multiples images in andorid kitkat . I have try below code which work for me for Xperia M2 4.4.4 For start image selection activity private void startImageSelection(){ Intent intent = new Intent(); intent.setType(

How to add a wallpaper-gallery to an Android application

时间秒杀一切 提交于 2019-12-08 06:09:21
问题 I have noticed that some Android applications adds a new Wallpaper-gallery to the "Wallpaper-chooser". I am currently building a theme for Android and I would like to add some wallpapers with this feature. How is it done? 回答1: Figured out, that I have to write the code myself. Found the code in the Home-sample in the SDK 来源: https://stackoverflow.com/questions/4346698/how-to-add-a-wallpaper-gallery-to-an-android-application

Android: Unable to invoke Gallery with Video

て烟熏妆下的殇ゞ 提交于 2019-12-08 04:52:44
问题 I'm trying to invoke android gallery with videos loaded with it. This method working fine for the intent android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI but it doesn't work properly for me and returned following exceptions. Can someone hlep me out please. 08-09 17:12:26.992: ERROR/AndroidRuntime(878): java.lang.RuntimeException: Unable to start activity ComponentInfo{a.b/a.b.SDCardVideoActivity}: java.lang.SecurityException: Permission Denial: starting Intent { act=android

ContentResolver Change gallery folder name

半腔热情 提交于 2019-12-08 04:32:08
问题 i'm using the code specified here to store a Bitmap image and show it into the gallery. Unfortunately that code let me store image to "Pictures" folder into the Gallery. Is it possible to change the folder name with a name that i decide? 回答1: OK, I've modified the code from your link and tested this code. just use this: public class CapturePhotoUtils { private static String folderName = "yourFolderName"; /** * A copy of the Android internals insertImage method, this method populates the *

Get button to work in gallery with inflated layouts

自古美人都是妖i 提交于 2019-12-08 03:49:11
问题 what i have until now is a customized gallery activity in which i inflate layouts instead of images to create a swipable ui quite similar to the android homescreen. In my application this represents a catalogue of descriptions and pictures of artworks the user can browse through by swiping. Because gallery consumes all touchevents, i made my own subclass of the gallery class to allow scrollviews to function. I´m now trying to add functionality to some buttons in the inflated layouts. I think

How to get screenshot saved path by Cocos2d-x on android

Deadly 提交于 2019-12-08 03:15:01
问题 I use saveToFile method to save screenshot, and I check CCLOG, it shows /data/data/com.xxx.xxx/files/xxx.png However, when I use Java to get this file, it says "No such file or directory".... What can I do? 回答1: I had the same problem. Apparently, cocos2dx never creates the writable path directory so the screenshot doesn't get saved. My solution was to, instead of calling CCRenderTexture::saveToFile , copy its implementation and manually save the file to a different path: std::string MyClass:

Intent.EXTRA_LOCAL_ONLY doesnt work

时光毁灭记忆、已成空白 提交于 2019-12-08 02:53:42
问题 What I'm trying to do in my application is to let the user choose a picture from his phone's gallery. The code I'm using is as follows: Intent intentBrowseFiles = new Intent(); intentBrowseFiles.setType("image/*"); intentBrowseFiles.setAction(Intent.ACTION_GET_CONTENT); intentBrowseFiles.putExtra(Intent.EXTRA_LOCAL_ONLY, true); startActivityForResult(Intent.createChooser(intentBrowseFiles,"Select Picture"), SHOW_GALLERY); By putting : intentBrowseFiles.putExtra(Intent.EXTRA_LOCAL_ONLY, true);

Custom ArrayAdapter: why do I get a NullPointerException?

你离开我真会死。 提交于 2019-12-08 02:48:13
问题 Sorry for bothering people so proficient, but I am new to Android and I am trying to learn... Anyway, I am trying to build a Gallery with a custom adapter. But I get NullPointerException as soon as the program tries to invoke the adapter. Any help very much appreciated!!!! public class MainActivity extends Activity { private Gallery gal; private List<Elementi> el; @Override protected void onCreate(Bundle savedInstanceState) { List<Elementi> el = new ArrayList<Elementi>(); int[] tabDrawables =

How to get screenshot saved path by Cocos2d-x on android

拥有回忆 提交于 2019-12-08 02:17:32
I use saveToFile method to save screenshot, and I check CCLOG, it shows /data/data/com.xxx.xxx/files/xxx.png However, when I use Java to get this file, it says "No such file or directory".... What can I do? I had the same problem. Apparently, cocos2dx never creates the writable path directory so the screenshot doesn't get saved. My solution was to, instead of calling CCRenderTexture::saveToFile , copy its implementation and manually save the file to a different path: std::string MyClass::takeScreenshot(CCScene* scene) { cocos2d::CCSize screenSize = cocos2d::CCDirector::sharedDirector()-

How can I create a good-looking responsive image gallery WITHOUT perfectly sized images?

心不动则不痛 提交于 2019-12-08 00:12:22
问题 I'm using Wordpress and user-uploaded images. I'm trying to build a responsive image gallery using Bootstrap but I'm running into some trouble with it: Picture.png http://img339.imageshack.us/img339/6838/picturehq.png Also find it on jsfiddle, (make sure to set the output window big enough that they switch to multi-columns) Some of the real-world challenges and some of my constraints: The images aren't all going to be the same size The images shouldn't have to all be the same size The gallery