match a nine-patch image with simple image

I want to put two images together (a nine-patch image with icon), So that icon size does not change.

I designed nine-patch image but i don't match these images together. Is there anyone who can help me?

Answers


You can use the android layer list drawable. This allows to stack layers on top of each other. The first layer can hold the nine patch image and the second layer can hold the icon which wont be stretched.

This is how it would look like

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@drawable/wp_tabbuttonstrip"/>
    <item>
        <bitmap android:src="@drawable/wp_dashboard_icon" 
            android:gravity="center"/>
    </item>
</layer-list>

You will need to specify the size of the view, wrap content might not give the desired results.


Need Your Help

Cannot compile program-exits with code 1

c++ opencv dll computer-vision

I am using opencv,c++ and Microsoft Visual Studio 2010 to compile my code but I get all these.

How to convert from Int64 to hex and from hex to byte in c#

c# hex type-conversion byte int64

I am trying to send a byte array to micro controller over serial port. This is an example array which can successfully communicate with micro controller:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.