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.
Related
My requirement is to draw a straight line between three image view in android. Please some one give any solution or send me any source code. I am sending a image please have a look.
enter image description here
You could place transparent ImageViews over your pictures, and if there is a winning pattern, draw the line on the ImageViews. Maybe this help you as well:
https://stackoverflow.com/a/6179075/7325737
I'm implementing a custom camera, in the layout I have a rectangle inside the layout, where the user have to put his card, so after take the photo i need crop the picture, taking the reference the rectangle.
Any suggestion of how to do this?
Possibly you can use a library that do this on your behalf.
If you are not fully satisfied and need to understand how it works the process you can read the API. I do not know exact if you mean the selection have to be a rectangle of you are referring to the rectangle of your customer view where the card should fit, in the first case the library from Arthurhub should be enough
if you want to implement from scratch, I guess you need to use Matrix
enter link description here
https://github.com/ArthurHub/Android-Image-Cropper
I want to save off a Bitmap of the current screen for my users to share, but I only want to do a partial (I want to remove the areas that have user buttons and such).
I have found code on taking a full screenshot, but cannot figure out how to do this.
Hoping there is something easy that I am just missing.
Thanks in advance.
Put the partial area of which the screenshot is to be taken in a ViewGRoup say RelativeLayout. Then when you launch the Activity just make sure to build the drawing cache as follows
relativeLayout = (RelativeLayout)findViewById(R.id.relativeLayout);
relativeLayout.setDrawingCacheEnabled(true);
relativeLayout.buildDrawingCache();
And then when you actually want ot take the screenshot of that particular area, just get the Screenshot in the form of a Bitmap from the drawing cache
bitmap = relativeLayout.getDrawingCache();
You can place elements in Frame Layout which you want to in screen shot.
Then you can take screen shot of Frame layout.
You can refer this Link : http://divyamotiwala.blogspot.in/2013/10/taking-screenshot-of-layout-in-android.html
(Sorry for my bad english)
I have two pictures. One picture is colorful and big. On the other picture shows a black figure arbitrary shape (like a cross or a star or a piece of the classic puzzle) on a transparent background.
I want to put the second picture on the first picture and replace the black with part of the first image. Then i need to save the second image in a new file.
Thank you.
Max.
You can get this by using a library and a single line code.
Please try this, hope you will get a better solution.
dependencies {
compile 'com.mafstech.libs:mafs-image-shape:1.0.4'
}
And this line is your main code
Shaper.shape(context, R.drawable.your_original_image_which_will_be_displayed, R.drawable.shaped_image__your_original_image_will_get_this_images_shape, imageView, height, weight);
You need to use xfer modes, unless you are preaperd to create Paths and then clip canvas.
Check my answer here: how to draw pic to Closed curve area
Follow the links for examples...
I would like to know if we can edit the picture that we take from a camera and store it on our Phone. Can we make use of android.graphics package to edit the picture.
One of the sample picture has has been edited on the top width is this as you can see the image has been clipped from the top center just below the word "Discovery". Is this possible on Andriod?
Yes, you can make a Canvas out of a bitmap, and then use canvas drawing commands to mutate and save it again.
I'm not really sure what you're asking, though.