gallery

Custom drawing on top of Gallery view (and it's child views)

雨燕双飞 提交于 2019-12-06 10:14:34
I'm trying to draw custom UI (a path in this case) on top of a Gallery. I've extended the base Gallery class and overwritten the draw method like this: public class MyGallery extends Gallery { ... @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); canvas.drawPath(mPath, mPaint); } I thought that putting my path drawing after super.onDraw would make sure that the path was drawn on top of the gallery AND it's child views, but instead the child views are layered on top of my path. Does anyone know how to draw this properly? (I know I could include a RelativeLayout and layer a

Open Image in full screen android

本小妞迷上赌 提交于 2019-12-06 08:49:25
问题 I have an image in thumbnail in my application and I want to display full screen image like it shows, when you click on any image in gallery and it displays in full screen. How can i achieve that? 回答1: You could launch the gallery app itself to view the image using below code snippet You could give this a try. Intent intent = new Intent(); intent.setAction(android.content.Intent.ACTION_VIEW); intent.setDataAndType(Uri.parse(file.getAbsolutePath()),"image/*"); startActivity(intent); 回答2: I

JavaScript - Preload Images

风流意气都作罢 提交于 2019-12-06 08:27:25
问题 I'm working on a photo gallery, and I would like the ability to have a gif preloader show before the main image is loaded, and then show the main image. So, this is what I got: I have a #photo_place which is the div that holds the main photo. This changes depending on what thumbnail the user selects. When the user does select a thumbnail, this function is triggered: function gallery(icon){ $('#photo_place').css('background-image','url("../images/'+icon+'.png")'); } Now, what I want, is to

Create Image from imageview and textview?

こ雲淡風輕ζ 提交于 2019-12-06 07:30:16
I'm making an app that will allow the user to add a photo to an imageview from the gallery of their phone which I have already been able to code successfully. I now want to be able to allow the user to add text on top of the photo and then save the text and image as one back into the gallery. Is there any way to do this? XML: <LinearLayout android:layout_height="match_parent" android:layout_width="match_parent" android:orientation="vertical" xmlns:android="http://schemas.android.com/apk/res/android"> <ImageView android:id="@+id/image" android:layout_height="400dp" android:layout_width="fill

Images not being saved when picture is taken by camera app that isn't the stock camera

南笙酒味 提交于 2019-12-06 07:09:41
问题 I'm currently trying to save images taken from a phone to its gallery, but the code below only works if I choose the stock camera app when the chooser dialog pops up. Whenever I choose another camera app(e.g., the Google camera), the taken picture doesn't get saved any where. To make things even stranger, sometimes the picture does show up in its designated directory in the gallery, but after 15 mins or so, the same goes for when I use the stock camera app: the picture will get saved in the

Reusing default Android image gallery?

谁说我不能喝 提交于 2019-12-06 05:35:32
问题 All the examples I've found online for displaying a gallery of images require creating a custom Adapter and doing a ton of manual work. Is there not an Intent that I can simply pass a path or filter to in order to reuse the default image gallery functionality (display thumbnails, touch to view full pic, sharing options, etc) but limit the results to my application's storage directory? 回答1: The Gallery application has no rights to access files in your application's storage directory. The

OutOfMemoryError: bitmap size exceeds VM budget

蹲街弑〆低调 提交于 2019-12-06 05:11:43
Sorry it seems like a repeated question, BUT I think I don't qualify to any of the recommendations already posted. I've a Gallery of maximum 20 images on my application. After playing a while flinging back and forth I'm getting OutOfMemoryError. The strange thing is that I don't hold any static references, and I've searched for possible memory leaks I can assure that I've not found one so far. Anyway, 20 images (PNG of 100KB on average) doesn't be like that much. And I've implemented a view cache, SoftReference holders for the bitmaps, etc. Is it 20 PNG images of 100KB on average enough to

How to apply a motion-blur in javascript/jquery? [duplicate]

别等时光非礼了梦想. 提交于 2019-12-06 04:59:10
问题 This question already has answers here : HTML5 Canvas Motion Blur effect? (2 answers) Closed 6 years ago . I'm wondering how to make a motion blur in javascript/jquery. I've an horizontal gallery and I want to apply the motion blur when the images are moving. Actually, It works perfectly with that way : an overlay image with a motion blur (photoshop) and the opacity varies depending to the speed of the images. The render looks pretty good but i need to load 2 times all my images and it sucks.

Loading and appending images progressively

别来无恙 提交于 2019-12-06 03:33:11
I have an issue I can't get over. I made a simple jQuery album gallery and I have this function: function loadAlbum (index) { for (var j=1; j < xmlData[index].length; j++) { var img = new Image(); $(img).load(function() { $(this).hide(); $('#album'+index+' .photoContainer').append(this); $(this).fadeIn(); }) .error(function(){ //alert("Could not load one or more photo!"); }) .attr({ 'src': xmlData[index][j], 'id': 'img'+index+j, 'class': 'photoFrame', 'width': newW, 'height': newH }) .css({ 'width': newW, 'height': newH }); }; }; Now, as you can see all the images src's are imported from an

左右滑动浏览图片,选中图片放大,浮在左右图片之上,图片的放大缩小拖动,多指触控

∥☆過路亽.° 提交于 2019-12-06 03:31:55
实现效果图如下: 开始用viewpager 做,考虑到一屏显示三个图片,并且中间Item 要有选中效果和放大效果。 发现Gallery 更好做一点。 目前也有些问题 一。为了实现选中Item 浮在上面,用了vGallery.setSpacing(-50); 设置Item 间距。用的负值。所以,拖动时,边上过度的两个Item 会看到重合叠加的情况。 如果一屏显示四个,或者更多个Item ,就无法实现效果了。 二。选中Item 放大效果是通过 iv.setLayoutParams(new Gallery.LayoutParams(640,360)); 实现,左右滑动时,Item 的放大缩小太突兀,没有过场动画。 代码如下: activity_main.xml 主布局 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/bg" android:orientation="vertical" > <Gallery