Create custom background android like this chat shape
Asked Answered
L

2

0

enter image description here

**How to achieve this ** i tried 9 patch there i cant make this and no direct one available

Leprosy answered 13/4, 2013 at 16:16 Comment(0)
L
3

This is a job for 9-patch images.

Here is one of many examples with a gradient background.
9-patch with callout and gradient background

The expander bars above, below, and to the sides of your image control where the image stretching can occur and where the text padding lies.
Here is how to keep the callout in an arbitrary location of the image:
enter image description here

Here is an interactive online tool for drawing the expanders and downloading the result once you find or finish creating your gradient/callout image: http://draw9patch.com

Ludly answered 13/4, 2013 at 16:29 Comment(5)
Theres no tutorial ,just 2 images with low clarity, can u give me a high resolution oneLeprosy
@Arju this isn't a "do-it-for-me" site.Curriculum
@kcoppock i dont told so, then how can a image be programmed ,give me answerLeprosy
@david thanks for the help , i need that projection at left end as a chat symbol, thats y i asked againLeprosy
How to make a 9-patch image exactly like the example in your question: 1. Get image editing program such as Gimp (free) or Adobe Photoshop. 2. Start with your example. 3. Make the black background transparent (Google how). 4. Clone out all the views on top. 5. Use Google 9-patch editing tool (developer.android.com/tools/help/draw9patch.html) to add the 9-patch expansion bars. @kcoppock is correct that we can't do it for you, but the recipe above will get you there one step at a time if you are willing to do the work.Ludly
E
-2

I would recommend these styles: http://www.dibbus.com/2011/02/gradient-buttons-for-android/

Just create a View and set the android:background="@drawable/blueButtonStyle"

Exobiology answered 13/4, 2013 at 16:23 Comment(2)
How would we get the tail of the callout from these buttons?Amann
This answer does not explain hot to get a 9patch. it only helps on shaping views to the normal shapes.Rosenblatt

© 2022 - 2024 — McMap. All rights reserved.