Here is an example of what I need to do:
First of all I convert the image into bitmap and then set it as background to a relative layout. And i know these four coordinates.
Then how can I get the image inside the box and set it to another layout as background?
Try to use Picasso when you are dealing with Images.
This is the link
Related
I have a frame image and another image selected from gallery. What i want is to place that image inside the transparent part of that frame image and also I can apply onTouchListener on the image selected from gallery.
Like in the app whose link is provided following.
https://play.google.com/store/apps/details?id=com.lyrebirdstudio.pipcamera
Any idea or concept will be helpful.
My IDEA
Here is what i am thinking to create a relative layout and setting the Picture Frame as a background and then scaling the other image according to the size of the relative layout. Then i can apply onTouchlistener on the image easily.
Am i going in right direction or there is some better way though which i can achieve the desire results?
Thanks in advance.
http://stacktips.com/tutorials/android/how-to-drag-a-view-in-android
OR
how to drag an image by touching in android?
hope it helps..
how can get image from gallery and set this image on another image and edit this image for fix this on frist image??
(Sorry for my weak english language)
if you only want to display two overlapped images in UI try to use FrameLayout
how to overlap two images each other
but if you really want to combine those images you can do that through 'Canvas' class
How to combine multiple images into a single image in android?
http://www.jondev.net/articles/Combining_2_Images_in_Android_using_Canvas
so I'm trying to find the region of the current image in the ImageView and fill that region with a different image. Here is the original image Empty Circle inside an imageView. The imageView has a drawable of a circle inside. Then I'm trying to make it into something like this Circle filled with image inside an ImageView when a user chooses an image. I don't want to manually Photoshop a circle image. I am just hoping to fill the region with another image. I have tried SRC_IN method from AlphaComposite, but for android, I can't convert from BitMap to graphics2D. If anyone knows how to solve this using the BitmapFactory in android, I would really appreciate your help. Thank you.
The other solution besides Bitmaps, may be too simple for whatever you are trying to achieve otherwise I think it would have occurred to you. I'm just pointing it out in case you have "code blindness" and are trying to over-engineer the solution because you've worked on it for too long (we've all done it)
It is to have that circle/shape image saved as a png with the area you want filled being transparent then set it as the drawable for an ImageView (etc.) then in a RelativeLayout lay this view over the image you want to fill the area and apply a transparent background to the shape view OR simply set the fill image as the background for the shape view.
I use an ImageView to display the entire image. I want to launch the next activity when the sun is touched. Is it possible by using this single image or should i use separate imageview for sun? I know how to do it with separate imageview. I want to know whether it is possible by using only the full image?
Use two imageviews
Easier and less bug-prone
In my application i want displaying the one image as half of the screen and below i am producing that image spelling and below display that image name letters as shuffled and kid will take one image and place into into that place in above spelling.For example see following website
//www.youtube.com/watch?v=_LSlYYu3F0k
For this how can i design my layout(xml)Please gice me some code suggestions.Thanks in advance
With a layout based on xml you wont get a result like that on the video.
You should use 2D/3D based SurfaceView/GLSurfaceView and draw on the canvas what you need and where you need it.