How to launch draw9patch and is it absolutely necessary to rescale pictures?

android, eclipse, image, java, scale

Solution

I read on another forum that to launch draw9pad from your console, you have to do java -jar draw9patch.jar from the command prompt once youre in sdk

Please use the `draw9patch` batch file or shell script found in the `tools/` directory of your SDK installation.

I did that but i still cannot launch the file

First, that is because you did not type it in correctly, as you did not include the `.jar` extension.

Second, that JAR file is not in that directory. You can tell that by looking at the directory contents.

Instructions for running `draw9patch` can be found in the Android documentation.

Is this tool absolutely necessary for your pictures to scale on different screens?

Quoting the documentation:

A NinePatchDrawable graphic is a stretchable bitmap image, which Android will automatically resize to accommodate the contents of the View in which you have placed it as the background.

Scaling for different screens is not really the role of a nine-patch PNG file. Scaling for different content is. A nine-patch is used as the background for widgets like `Button`, `EditText`, and the like.

Problem

I read on another forum that to launch draw9pad from your console, you have to do java -jar draw9patch.jar from the command prompt once youre in sdk. I did that but i still cannot launch the file. Is this tool absolutely necessary for your pictures to scale on different screens? I know that eclipse has these drawable folders that scale your pictures to different dpis or is that not what they do? Console output: https://i.stack.imgur.com/kl8s3.jpg File skd/tools :https://i.stack.imgur.com/iurXR.jpg

Original source