I have a small project in which i download images from internet in the form of drawable and use them in Imageview for which i have provided functionality similar to an Imagebutton but without the gray edges.
The question is that is there any functionality in Android(similar to iphone) by which we can crop the drawable from edges to make them rounded edged drawable...
Even if its a "not-tested-neither-recommended" method, do let me know... i would like to work on this a bit... thanx in advance folks...
I believe this is probably the link you're looking for: How should I give images rounded corners in Android?
I tried doing it with a drawable and nested and elements, but wasn't able to get the image drawable to show properly. Not sure if there's a way to get this working or not.
Related
I am working on image processing i have achieved color effect using ColorMatrix but i cant understand how to achieved one effect that is not on whole image but only around the image like i have attached image. Actually i m working on image editor app like : BeFunkey
Here original image and processed image i have attached. You can see in effect on second image that is only around the image black shadow. Please can anybody tell me how to do this. Thank you in advance.
You need to set RGB colors of you bitmaps. Have a look over android-image-filter
This demo will fulfill your requirements.
I am trying to create an application which has a map image in it.
I want to add some areas (or buttons) to it so that when you click them the bubbles with information will appear.
I am new in android programming so asking to explain a bit how to implement it?
Also i need an image to be re-sizable just like a real map.
So should i attach the buttons to specific places on image and how to do so that the buttons will be connected to it when i re-size an image?
Which image type is better to use for this purpose? I heard that SVG would be better but i couldn't even add svg image to an application.
I appreciate any helpful advice.
For your problem you can use this:
http://catchthecows.com/?p=113
I need something similar, but the click on the image should change the content of that part as well.
When I find or implement the final solution I can post it here.
I have simple png image (http://imgur.com/GAoKEnh) and when I zoom out, to <10% the image begins to deform and I am missing most of the outline. The zoom-out is for supporting multiple displays.
This image is actually used as a template for a collage and so it is in its "final" size, and I wish to keep it like so.
I tried to convert the image into a 9-patch, but it still shows the same behavior.
I've tried asking Google but without success... could you please advise?
Thanks
The designer has given me two PNG images and they are supposed to be the background for all the buttons of my app. I am not being able to transform then into 9-patch image. It seems like that one image has too much details to be a 9-patch, stretching it would make it lose the details.
Can you guys take a look and let me know what you think?
http://img211.imageshack.us/img211/1965/background1p.png
http://img845.imageshack.us/img845/676/background2a.png
Many thanks,
Felipe
//repeatimage.xml
<?xml version="1.0" encoding="utf-8"?>
<bitmap
xmlns:android="http://schemas.android.com/apk/res/android"
android:src="#drawable/tileimage"
android:tileMode="repeat"
android:dither="true" >
</bitmap>
and set this image in your layout background as
android:background="#drawable/repeatimage"
//slice your image into small pieces
Try using this tool . It's a simple 9-patch generator that can be of use to you.
For both your questions:
1: I use images with shadows a lot and you can certainly convert them into a 9-patch image. I am not sure how I can explain the actual steps involved in creating this. Perhaps an example will help you work that bit out.
2: For an image with a pattern in it, a 9-patch of it as #Padma Kumar pointed out, will still distort your image. To fix that, you can follow the link attached. It is a nice tutorial on how to use tiled patterns as backgrounds. http://androidforbeginners.blogspot.in/2010/06/how-to-tile-background-image-in-android.html
A side note: The draw9patch can be quite an intimidating tool. Until you get the hang of it, you could consider using this website here: http://android-ui-utils.googlecode.com/hg/asset-studio/dist/nine-patches.html. It however, works only in Google Chrome.
Maybe you should check this tutorial: http://www.thesecretpie.com/2010/07/creating-custom-fancy-buttons-in.html
It explains how 9-patch actually works and how to use drow9patch tool which comes with Android SDK. It was really useful for me.
And for the shadows, you just need to save image with transparent background (of course) and with a little free space between shadow and edge of an image which you will use to draw lines for 9-patch
I have an image that is circular and I want to make the other junk in the image to be transparent. I've spent the last hour looking around and I can't seem to figure out how this is done for android. Any help is greatly appreciated!
I haven't worked with Android but on iOS pngs weren't loading for me when I made them in photoshop but when I made them in flash all of a sudden they would work! Try that first :)
Anyways, you want to google something along the line of "pixel arrays android code" you can create an array of each pixel, find an individual color, then make it transparent...
But I really think this is just a GIMP issue and you don't need to go through all of that hassle.
what i can understand from your uncleared words is that you want to display transparent image of a normal image you have . so i would suggest don't do it through programming . create a transparent image through any image editor tool and use it .
if image is dynamic that you cant go in this way so use Matrix and setAlpha . search over net for both the terms