gallery

Changing image sizes proportionally using CSS?

▼魔方 西西 提交于 2019-11-27 09:02:13
问题 I have been trying for a couple of days now to configure my thumbnail gallery so all the images appear the same height and width. However when I change the Css code to, max-height: 150px; max-width: 200px; width: 120px; height: 120px; I get images that are all the same size but the aspect ratio is stretched ruining the images. is there not a way to resize the image container and not the image instead? allowing me to keep the aspect ratio. but resize the image still. (I dont mind if i cut off

How can I display images from a specific folder on android gallery

落花浮王杯 提交于 2019-11-27 08:47:24
How can I display all images from a specific folder on android gallery like, for example, whatapp does. I`m using MediaScannerConnectionClient File folder = new File("/sdcard/myfolder/"); allFiles = folder.list(); SCAN_PATH=Environment.getExternalStorageDirectory().toString()+"/myfolder/"+allFiles[0]; @Override public void onScanCompleted(String path, Uri uri) { try { if (uri != null) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(uri); startActivity(intent); } } finally { conn.disconnect(); conn = null; } } private void startScan() { if (conn != null) { conn.disconnect(); }

How to distinguish whether the image is coming from gallery or camera in android?

只谈情不闲聊 提交于 2019-11-27 08:45:26
问题 I am making an app in which i can pick an image from gallery or i can take image from camera and i am moving to next activity with the selected image.There I want to distinguish whether the image is coming from gallery or camera.I am not getting any idea how to do it.I am providing my code.Please help me how to do this. My first activity is import java.io.ByteArrayOutputStream; import android.app.Activity; import android.content.Intent; import android.database.Cursor; import android.graphics

jquery move elements into a random order

隐身守侯 提交于 2019-11-27 08:29:57
I am attempting to display a series of images in a random order. However, I do not want any single item to repeat until all items have been shown, so instead of selecting a random image from the array, I want to take the entire array, randomize it, and then select in sequence from the first to the last element. Here's my code: HTML: <div id="tout4" <img src="images/gallery01.jpg" class="img_lg"/> <img src="images/gallery02.jpg" class="img_lg"/> <img src="images/gallery03.jpg" class="img_lg"/> </div> and the javascript, which currently selects and displays the items in order: var galleryLength

FancyBox gallery integration

喜欢而已 提交于 2019-11-27 08:26:21
问题 I have a question regarding the integration of FancyBox. I would create a gallery with 10 pictures but only one thumbnail. For example: http://fancyapps.com/fancybox/demo/ The first demonstration shows four images : forest, sea, sunset and Effeil tower. Can I include a single thumbnail, for example a thumbnail of the Eiffel Tower, which on clicked, would display the image of the Eiffel Tower in the lightbox, but also those of the forest, sea and sunset. I tried many things but nothing works

How to avoid spacing in the start and end of Gallery

谁说胖子不能爱 提交于 2019-11-27 07:58:04
问题 I don't want a circular gallery, but instead I don't want to show the free space in the left and right end of the gallery? Is there any possible way I can achieve this? 回答1: I will suggest you to try HorizontalListView. Its not that good as other android components but proves to be worth in most of the cases Horizontal ListView implementation has the following features: Subclass AdapterView so I can make use of adapters Fast – make use of recycled views when possible Items are clickable –

retrieve absolute path when select image from gallery kitkat android

点点圈 提交于 2019-11-27 07:51:15
As I am supporting my app to Kitkat version, now in this the way of retrieve file from gallery was different. I have preferred this Android Gallery on KitKat returns different Uri for Intent.ACTION_GET_CONTENT for retrieving file from gallery and successfully work but I required Absolute path of that file, I am getting content://com.android.providers.media.documents/document/image:2505 For 19 below version we used uri different by using that I am getting path this way Cursor cursor = this.getContentResolver().query(originalUri, projection, null, null, null); int column_index = cursor

Select multiple images from Photo Gallery on Android using Intents

余生长醉 提交于 2019-11-27 07:26:25
@See this https://stackoverflow.com/a/15029515/185022 I`m trying to select images from gallery, but i only found the way to select a single image. Intent photoPickerIntent = new Intent(Intent.ACTION_PICK); photoPickerIntent.setType("image/*"); startActivityForResult(photoPickerIntent, 1); Is there a way to select multiple images? Siklab.ph Create a custom gallery same like: Android custom image gallery with checkbox in grid to select multiple First of all you need to use putExtra with your photoPickerIntent photoPickerIntent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE); Then in your on activity

Using Intent.ACTION_PICK for specific path

倖福魔咒の 提交于 2019-11-27 05:13:12
I am trying to use Android gallery to pick image. Launching gallery is easy for that purpose Intent photoPickerIntent = new Intent(Intent.ACTION_PICK); photoPickerIntent.setType("image/*"); startActivityForResult(photoPickerIntent, 1); However, I need to limit images that are shown in the gallery to specific path on device (i.e. to show images from single folder only). Is this possible to do and how? hackbod Sorry, no this is not possible. Also you are using this Intent protocol wrong. As per http://developer.android.com/reference/android/content/Intent.html#ACTION_PICK this protocol expects

Android ViewPager with previous and next pages visible?

為{幸葍}努か 提交于 2019-11-27 05:01:01
问题 I am currently building a horizontal gallery of videos. I'd like to make something like that with only one video centered and part of previous and next videos: I first opted for a Gallery but its limitations made me look for something else. I'd like to show a page indicator and it is quite difficult to implement using a Gallery. The second option was to go for a ViewPager from Android Compatibility library. I found a way to implement a page indicator over it. But now, how to partly show left