I have a Gallery. I have used the android:unselectedAlpha parameter so that the center image in the Gallery is more bright. However, I would like to have this center image size to be bigger than other images. Is there a way to do this ?
You could add and onClickListener to each image. When the image is clicked you could change the layout so that the image is then bigger.
Related
i am trying to implement gallery using HorizontalScrollView.
When user click image image it should "grow up" to show this image like this: (i will have images from drawable folder)
Image Preview
Use PopupWindow. In the layout just put an imageView and fill it with the clicked image.
Check this out http://mobilemancer.com/2011/01/08/popup-window-in-android/
I need to crop and center an image to make a thumbnail for a list, but I want the size of the thumbnail to be proportional to the screen size, so that when the list is shown on a tablet or on a phone the image can be perceptible.
Any idea how can I do this?
You can use an ImageView to display the thumbnail.
Set the size of the ImageView in the layout XML, where you can set a different size for each screen size, by following this guide: http://developer.android.com/training/basics/supporting-devices/screens.html
Make sure the scale type of the ImageView is set according to your need by setting the correct android:scaleType property to your ImageView. The available scale types can be found here: http://developer.android.com/reference/android/widget/ImageView.ScaleType.html
That should do the trick.
I have a list of special items: in left side foto and in right side of item some text. Under the list background with special texture. Image should be crop in the form of a pentagon. Haw to crop the image and not to disrupt the texture under it?
I'd say that create an image however you want to crop your image, i mean as it's mask and put it on your imageView... And then set your imageView which is below mask. So it'll seem like your image's been croped.
how to center an image from gallery? If i use setSelection()
the gallery didn't are center, she move sometime in left sometime in right.
She move in center only if the image was in extremities or if the selected image was in center.
If i do a second clique the picture go in center, i don't understand why. I use a setOnItemClickListener to change the image.
This is what the behavior of the Gallery.Just Use the classes of the Gallery Customize it which involve CustomGallery CustomAbsSpinner and CustomAdapterView and change the function of Gallery class getCenterOfGallery() as per your requirement.
How can i reduce the size of the image android programatically.
Size of image can be set in grid view. Is it possible to set the size of image displayed in
Edit Text that is received from grid view selected image.
I have set of images in my gridview. I can reduce the size of the image in grid view display. so when i selct the image in gridview i get the image in edittext with its original size of image bigger. How can i reduce the size to small image.
Please guide me in this issue. Any sample working example shall be very useful for me to understand and work accordingly.
Thanks in advance.
Regards
You should try something like this,
Reduce Image Size