displaying images in android with zoom/pan/rotate etc functionality - android

So i got a lot of solutions online but none of them were simple and complete. First i tried using imageview and adding external libraries for zooming etc. but i couldn't find one which had all the functionality we see in a gallery app without being extremely slow. I read something about canvas though don't know what it is. I also found "zooming a view" in android official tutorial but it was just a single tap zoom. So which is the best solution (in terms of functionality and speed) for this: I want an activity to show just a single image such that the user can zoom/rotate/pan it as its gonna contain text that the user needs to be able to read. So basically just like a gallery app. Is it possible to call on the gallery app activity to display this image? Why doesnt android have better support to do this? What is the best way you would suggest.

Related

How to have an free flowing overlay structure in my android activity which is scrollable in every direction?

I am building an android app. I am new to this, I found out an interesting activity UI development, But I don't know how to describe that property properly in android terms-(I SINCERELY APOLOGIZE FOR THAT ).I am adding a video, Please consider it.Free Flowing multi-directional Smooth scrollable android overlay UI (Please turn on the subtitles on)
How to have that kind of UI overlay suppose I want to display a large image or file with multiple clickable buttons on it[I have already tried various Image loading libraries to load big size images and to make that Multidirectional scrollable].But that's not the exact thing which I want (like you can see the above mentioned reference).
So how can I execute that?
Thank you In advance for considering your time.

Android Creating a masking activity

I'm attempting to create an activity which allows a user to mask out part of an image. The way I'm trying to achieve this (yes trying, because it still isn't working for me, please see my other SO questions), is by painting a color over the base image using the canvas. I saw an app this morning which basically does exactly what I need and I thought I'd ask here if anyone knows how the app is doing the hard work and if there is a good tutorial or documentation somewhere for this concept?
Basically you press part of the image and it automatically masks out to the edges of the object in the image, you press again to add more, and press to remove.
the app is called "AThumb Cut" and hope its ok to link to it here https://play.google.com/store/apps/details?id=com.instacut2
This is an amazing application indeed. They work like Magi tool in PhotoShop. Try this tutorial it tells you how to do it in Java.

Design of list view lazy loading images component

I have a scenario which I think is pretty common in Android applications. I know partial attempts of solving the issue were made, but until now I have not stumbled upon the full implementation. I intend to try to implement such component and open source it afterwards, but I need your help in its design.
So basically my case is the following: I have list view showing image loaded from the web and text per each row. I want to lazily load the images, placing default for each image and substituting it with the real one only when the image is downloaded. I also want to keep image cache avoiding the need to download the images multiple times in short period.
Up to now I have found several implementations that are partially working including:
Tom van Zummeren's implementation of similar component with several well known problems
Jeremy Wadsack's refinement of the concept, which is more or less working
Lazy drawables source forge project.
I also saw several stackoverflow questions regarding the problem: 1, 2, 3
However I have one more requirement which makes my task a bit more complex: I allow the user of my application to affiliate himself with some of the images. I want to load the new images associated to the user whenever the user navigates to the home screen. From it he should be able to go see his images, even before they have all been downloaded and in this case again default placeholders should be visible (Note the cross screen transition). Such use cases are:
An app listing user's youtube videos
An app for facebook - consider the images of friends
An app serving news that supports user's favorites etc
Note that I want to start fetching the new data related to the user on the home screen to provide better user experience. I will keep the user-related data stored locally forever.
The question
So my basic question is what approach should I use for the implementation of the image downloading? I know that the Android manuals say Service should be used only when I want to execute task even when application is not running. On the other side I will start the image downloading on the home screen and link the downloads to UI elements just when the user navigates to the new screen (Activity) - user-related list view and I do not know how to achieve that with AsyncTask (not that I have a very precise idea how to do it with Service either).
Any suggestion will be greatly appreciated, including links.
Universal Image Downloader is a good library which helps you to do image downloading in background with your settings.
It has so many features that you can implement at your own way.

Use a HTML page as Live Wallpaper in Android

Can I use a HTML page as a Live Wallpaper?
Or is it possible to capture a web page as an image and set it as a wallpaper?
Any help would be greatly appreciated.
I am the author of the mentioned WebLiveWallpaper. It can use both techniques: Showing a web snapshot from snapr, webthumb, ... but normally it is really a WebView which has disadvantages but also some advantages. A web snapshot/thumb image cannot update animated images fast enough. But it avoids the problems a 'hacked' WebView in a live wallpaper has (like missing images, huge memory footprint).
I think what you want is using one of these:
http://www.websnapr.com/
http://webthumb.bluga.net/home
http://snapr.seekxl.de
They all have more and better documentation on their sites than I can put in here. Mostly it is simply a picture from their url with your key and some settings.
There is an app on the market called WebLiveWallpaper that does this. There is an option in it for how often to refresh the view of the web page, which leads me to believe that it is simply taking a snapsnot of the page and presenting it as an image some how. Unfortunately I wouldn't know how to go about setting that up. But I think you're definitely going to want to go the image route.
Edit Here are some links that may help you out:
Open source Java library to produce webpage thumbnails server-side
http://www.acasystems.com/en/web-thumb-activex/
http://www.fileguru.com/apps/convert_html_to_image_in_java
I have not used any of these components before so I'm not positive about them but they seem like they can do what your looking for .

How to implement custom device photos gallery for android?

I'm working on android application that will have basic image gallery functionality included. I've managed to build activity that fetches list of photos from my application backend API and render them in android gridview within activity layout.
This is how it looks like at the moment:
However I'm having difficulties to build same gallery experience for user's device photos that were taken by camera and stored on device. Two solutions I considered were:
Building my own image gallery.
Starting default android image gallery using intent.
Solution 1: I belive that first solution will take me too much time to developed. I started with this tutorial but as soon I implemented it I found out that it is running too slow. Then I take a look at android camera source code to find solution but again I found that it will take me too much time to review the code and to build my own gallery from scratch. I also believe that it is not in Android OS philosophy to rewrite functionalities that already exists but to use Intents to start activities that can handle actions you need. This lead me to second solution.
Solution 2: I tried calling default android gallery using intent in order to browse user's device photos by soon I was stuck again. Problem this time was that as soon as user tap on photo, gallery exits and returns to activity that originaly started it, and I expected (and I want) to start large image preview instead. I saw that others had this problem too how to open gallery via intent without result.
Because I didn't find the fix for this I decided to quit.
My question is how can I overcome these problems and build gallery that is similar to one I already have for web photos.
If anyone could give me reference I would be most thankful.
this question is pretty old but, as it has a lot of views and quite a lot of upvotes, it could be good to bring an answer to it.
So, first the tutorials evolved a bit and you can find some cool stuff for your #1 option:
This is the one I prefer
This one uses a deprecated UI element but is also cool
This uses an Adapter which is, to me, the best way to proceed.
For your #2 option, I do not see any idea to not to return to the original activity because you still do not have control over the result of the intent you send through the system.
But there are another solution that you didn't mention: there are librairies which are very cool and that you could customise to get exactly what you want:
This one is a bit fancy
This one seems also to be pretty cool but you could have problems importing it because it's not a gradle project
This is the one I would definitely use.

Categories

Resources