Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.redwarp:9-Patch-Resizer:'
}
dependencies {
implementation("com.github.redwarp:9-Patch-Resizer:")
}
<dependency>
<groupId>com.github.redwarp</groupId>
<artifactId>9-Patch-Resizer</artifactId>
<version></version>
</dependency>
libraryDependencies += "com.github.redwarp" % "9-Patch-Resizer" % ""
:dependencies [[com.github.redwarp/9-Patch-Resizer ""]]
A resizer tool to automaticaly resize png files and 9 patches in several densities (previously hosted on https://code.google.com/p/9patch-resizer/)
To get the latest build (.jar or .exe file), check the release page on the github project: https://github.com/redwarp/9-Patch-Resizer/releases
The .exe file is just a wrapper around the executable .jar file, use it if you don't feel comfortable with a java archive ^_^
Let's face it : juggling with densities for Android is a bit of a pain, especially when dealing with 9 patch png.
And then comes this tool, that takes a xhdpi PNG file, or 9.png file, and generates ldpi, mdpi and hdpi png files automatically.
As simple as drag and drop can get.
And here is the changelog
Current version : 1.4.2
You're using 9patch resizer for your apps ? Don't hesitate and leave me a message!
I'll be honest, I don't really maintain 9-Patch-Resizer anymore, as 9-patch are somewhat a thing of the past, and I use as many vector drawables as possible lately.
I will of course consider bug fixes, but I might not have the bandwidth for feature requests.
Sorry about that.
Join us, and together, we can rule the galaxy as coders and...
If for some weird reasons, some of your PNG files aren't resized properly, don't hesitate to send them to me, so that I can investigate !