Now you're ready to review, make modifications in Eclipse and compile/build skins in console. Note that you can build skin only from console with Ant, thus, ensure “ant” command is in path and Ant generally works. You can't build/”run” skin from within Eclipse, it will probably find non-existent errors (just “delete” errors in Eclipse Problems then, as they are not relevant anyway).

Poweramp contains “default” skin, other skins inherit from this one, thus it's not necessary to define each and every image, style, layout, etc. to build your skin – you just redefine parts you want to redefine.

Poweramp demo skin sources include Ant build skin, which can be used both for developing/debugging your skin via jar packaging (“ant jarpush”, which immediately uploads skin jar to the connected device/emulator), or for APK building.

Poweramp detects installed skins (either built as APK or as jar files in appropriate folder on sd card) and shows them in Settings => Look and Feel => Theme

Poweramp detects skin change on Activity.onDestroy, i.e. when some Poweramp screen closed/navigated away with back button.

Poweramp skin is:

An Android project with specific ant build script

skin_lib library project, which is referenced by your skin project. skin_lib contains necessary AndroidManifest.xml definitions, some java/xml code for InfoActivity (the default activity which is started when skin icon is pressed in launcher)

Skin APK which contains skin resources and also some Activity (sample skins contain Activity which has just small hint/about text and button, which opens Poweramp theme selection dialog via intent).

Skin APK manifest should contain <meta-dataandroid:name="com.maxmpz.PowerampSkins"android:value="true"/>. This is used by Poweramp to find skin “app”, installed on the device.

Each theme in skin APK/jar is listed in values/skins.xml. There are 3 arrays (1 integer array and 2 string-arrays). First one contains (<integer-arrayname="poweramp_skins">) list of skin themes, second list contain skin names (<string-arrayname="poweramp_skin_names">), and third – skin author names (<string-arrayname="poweramp_skin_authors">). Basically, you can start with modifying these strings as needed in sample skin sources.

Selected skin theme/style applied to the whole application (either on user theme user selection in theme dialog or when Poweramp starts for the first time). Android styles and various other resources support some sort of “inheritance” - meaning app theme can be derived from some other global theme, which only few styles/images/dimensions/etc. redefined where needed.

Poweramp exploits this in its theme implementation, this simplifies skin development a lot, as skin author can start with “default” skin and modify elements he/she wishes gradually until desired result achieved.

For example, one skin author can redefine just Poweramp backgrounds, buttons, but leave icons as is. While another author can change all fonts, icons, some layouts, but leave “as is” backgrounds and buttons from default theme.

Generally, only limited number of styles could be modified to get absolutely different look from skin, but anyway, almost each style/resource in Poweramp can be overridden, though it's not strictly required or needed.

How to start building your own skin:

copy some provided skin source/template (e.g. skin_template) and name it as desired

ensure the skin_lib project is available to Eclipse and ant build tools (skin_lib project is near your skin project folder)

point key.store and and set key.alias to your android developer keystore/alias. Only needed for release version of APK for publishing on Google Play

<optionally> edit import project name in .project file (<name> tag) and “Import...” project into Eclipse project. Any text editor can be actually used for skin creation, Eclipse or other IDE is not required.

Skin build process:

ant – (default task) - Simple build skin as jar: while in skin directoryBuild should end with something like:BUILD SUCCESSFULTotal time: 1 second

ant jarpush - build (debug) skin as .jar and upload to the deviceNew skin is immediately available in Poweramp themes selection dialog. This is preferred way of debugging skins, as Poweramp can also detect jar changes immediately – you just need to close/return from Poweramp screen and start it again.

ant apkpush – build (debug) skin as .apk and upload/install to the device.

ant dist – build release skin as .apk and put it named as ${ant.project.name} into /dist directory. These builds are numbered appropriately with version.num, but AndroidManifest.xml is not modified automatically, i.e. you should manually increment version numbers there for updates on Google Play.

Namespaces:It's important to understand how namespaces work in skin xml files and how to properly use them to override some Poweramp style, image, layout, etc.

Various styles, images, strings, ids, almost anything in Android xml resources and resources themselves are identified by simple name within some namespace. By default (when namespace part is not specified), Android resource compiler uses project package name.

Poweramp package name is “com.maxmpz.audioplayer”, thus all resource references for Poweramp should be prefixed with “com.maxmpz.audioplayer:” (with semicolon) to be visible to Poweramp.

Simple example: <item name=”Text1”>...</item> - this defines some Text1 attribute, which is not visible to Poweramp, nor overrides anything for custom Poweramp skin.

<itemname="com.maxmpz.audioplayer:Text1">@style/Classic_Text1</item>

This overrides Poweramp Text1 attribute and forces Poweramp to use skin Classic_Text1 style everywhere, where Text1 attribute is referenced in Poweramp.

com.maxmpz.audioplayer namespaceprefix should be used also for in-layout ids (as Poweramp should be able to find widgets by known-by-Poweramp ids), strings, dimen(sions) and other resources.

This prefix shouldn't be used for the skin customized styles or other possible resources which skins adds to Poweramp – including new drawables, icons, custom layouts, colors, etc.

You can see clear examples of namespace prefix usage in skin_classic sources.

Sample projects and resources:

skin_lib

skin_lib project is not a sample project, but a library project, which should be referenced by your skin project. All skin SDK sample projects reference skin_lib, so if you copy/paste some sample project into the same directory where skin_lib project is located, reference is already valid. Otherwise you should edit <your project>/project.properties file and point android.library.reference.1 property to your skin_lib project location.

To setup this project, please rename skin_lib/local.properties.EDITME to skin_lib/local.properties and edit it:

ant build script rules for both library project and for the skin projects

reference Poweramp APK which is required in skin build process

skin_template

This is empty skin, which can be built out of box (please see section How to start building your own skin).

“Empty” means there are no overrides to default Poweramp skin at all.

two_skins

This is almost empty skin (just song title color override), which shows how to implement 2 or more skins in one APK.

skin_classic

This is full source of Poweramp Classic Skins, which include many skin overrides, graphics, layouts, etc.

skin_custom_info_activity

This sample skin project shows how to override skin_lib InfoActivity and add some extra buttons into it. This project tries to reuse as much as possible from skin_lib, derives activity class from skin_lib InfoActivity, but fully overrides AndroidManifest.xml.

reference_resources

These are Poweramp resources (animations, colors, drawables, layouts, dimensions, etc.) resources given for reference. As Poweramp skins are derived from default skin, please use reference_resources/values/default_styles.xml as primary source for available "skinnable" styles.

default_style.psd

Default theme "source" photoshop file. This is the file, from which all Poweramp graphic resources were generated for default theme. Note that the file is heavily organized into:

Grouped Layers. There are various groups, which visibilities are controlled by Layer Comps

Layer Names. These can be directly used as resulting image name. Various additional words after space should be ignored in the name (such as "copy", "xdpi", "mdpi", etc.). Default skin also adds "matte_" to each image name (as Poweramp has also few other themes, with graphics prefixed by theme name). Prefixing is not necessary for custom theme, but advised. Also, this is the only way to have two or more skins in one APK.

Layers. All Poweramp generated graphics placed into separate Smart Object layers. Those layers, which are not Smart Objects, are not used in Poweramp, but just there for visual help (i.e. android wallpaper, android statusbar, some backgrounds, etc.). Each Smart Object can be separately opened, edited and saved. Such separate Smart Object documents have specifically assigned dimension (width x height) to match icon and layout sizes. Some Smart Objects are duplicated right in PSD file for xhdpi/mdpi resolutions, some are not (where not needed).

9p files. Note that some layers have .9 suffix. This means, they have 9-patch "meta" black lines added (via "9p" named layer) and should be saved as "layername.9p.png"

Smart Object Layer Comp. Some images have few states, for example, buttons have normal, pressed, and focused states. These are all there, implemented via Layer Comps for such Smart Objects. When such Smart Object double clicked in Layers tab, Smart Object document Layer Comps tab will show available states. Normal state image is saved with Layer name, without suffixes (button.png), other state - with lowercase state name after underscore "_" (button_pressed.png, button_focused.png). This is true for Poweramp skins, you can follow any other naming scheme as long as you properly put your drawables/images names into appropriate XML files.

Update android:targetSdkVersion to 21 in AndroidManifest.xml of your skin and in project.properties

Android 5.0 doesn't support skin defined attrs.xml (style attributes) anymore. Those won't be resolved and skin will fail to load. Please remove such attributes from your skin xml code and use one of the following workarounds:

just use some styles/values directly, instead of using custom skin attributes

use some Poweramp defined attribute which can be safely used for skin (e.g. com.maxmpz.audioplayer:background can be used freely as skin attribute, as Poweramp uses it internally for sub styles)

]]>9443Fri, 02 Sep 2016 17:01:56 +0000A theme that lets you customize it (Maybe an end all be all theme app for everyone)https://forum.powerampapp.com/topic/9444-a-theme-that-lets-you-customize-it-maybe-an-end-all-be-all-theme-app-for-everyone/
A theme that has an interface which lets you customize what you see in the themed Poweramp. Eg. Let you change colors, positioning of things, designs, etc.

Just think about it.

Wouldn't it be the best thing ever?

]]>9444Fri, 02 Sep 2016 17:08:41 +0000Should we get Licence from Poweramp for developing skin?https://forum.powerampapp.com/topic/9259-should-we-get-licence-from-poweramp-for-developing-skin/
I am developing the theme for the Poweramp player. Should I need to get a licence before publishing on play store or is it open source licence for theme development?
]]>9259Mon, 25 Jul 2016 14:11:50 +0000Playliosto on main menuhttps://forum.powerampapp.com/topic/9169-playliosto-on-main-menu/
Hello everybody.

As you can see, on my headunit the screen is very long, 1280x480 and the app looks very empty...

Is possible to make appears on the black are the playlist? something like this old Centrafuse Skin. It was very usefull to select a song from the same album for example.

Thank you very much.

]]>9169Fri, 01 Jul 2016 19:26:58 +0000Customized Skinhttps://forum.powerampapp.com/topic/9149-customized-skin/
I am looking for someone to customize a skin for me. I don't have time to the learn the process and I am not sure if this app will work for me. Can anyone help? Willing to pay for the service.
]]>9149Tue, 28 Jun 2016 21:53:06 +0000Ошибка компиляцииhttps://forum.powerampapp.com/topic/8535-%D0%BE%D1%88%D0%B8%D0%B1%D0%BA%D0%B0-%D0%BA%D0%BE%D0%BC%D0%BF%D0%B8%D0%BB%D1%8F%D1%86%D0%B8%D0%B8/Здравствуйте, при попытке скомпилировать скин происходит следующая ошибка:

but they all show errors and my android device shows a “parsing error” when trying to run the theme apk file.

I did all the changings on PC and only changed png files (I didn’t renamed any file).

Can someone help me? All the tutorials on the web doesn’t work for me.

]]>8576Tue, 19 Jan 2016 01:06:30 +0000Is there an Android Studio skin template available?https://forum.powerampapp.com/topic/8251-is-there-an-android-studio-skin-template-available/Why would someone still stick with Ant???? Its should be obsolete nowadays...
]]>8251Mon, 05 Oct 2015 09:10:08 +0000Downloading skin apk's so they will work on 5.1?https://forum.powerampapp.com/topic/8016-downloading-skin-apks-so-they-will-work-on-51/In your comments section under your app, a customer stated that we should come to the Poweramp website and download skin apk's so they would work. Where do I find the skin downloads so they will work? I have a droid turbo running 5.1.
]]>8016Thu, 16 Jul 2015 11:43:06 +0000Poweramp API/Skin SDK Updatehttps://forum.powerampapp.com/topic/5047-poweramp-apiskin-sdk-update/Poweramp SDK on Github: https://github.com/maxmpz/powerampapi

I have build the "skin_classic" with the "skin_lib" given in the "powerampapi-master/poweramp_skin_sdk" folder. The problem is that the theme wont't be applied, it doesn't show any error, but just set the default skin, can anyone help me with that??

Tested in Sony Xperia Z3 with Android 5.0.2.

Some of the users of my skins have also the same problem on the same Android version.

Buildfile: E:\CODE\PowerampHoloMD\poweramp_skin_sdk\skin_template\build.xmlBUILD FAILEDE:\CODE\PowerampHoloMD\poweramp_skin_sdk\skin_template\build.xml:90: The following error occurred while executing this line:java.io.FileNotFoundException: C:\AndroidSDK (Zugriff verweigert // This means access denied) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(Unknown Source) at java.io.FileInputStream.<init>(Unknown Source) at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:250) at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:168) at org.apache.tools.ant.taskdefs.ImportTask.importResource(ImportTask.java:222) at org.apache.tools.ant.taskdefs.ImportTask.execute(ImportTask.java:163) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:435) at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:180) at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:93) at org.apache.tools.ant.Main.runBuild(Main.java:826) at org.apache.tools.ant.Main.startAnt(Main.java:235) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)Total time: 0 seconds

so... as far as I understand I don't have the permissions in order to read or use the android SDK. I've tried to copy it to another folder, same result. Tried to set all permissions manually through folder properties, same result. Same with deactivating the antivirus...

I'm pretty helpless with that and because of this special use case there are little to no help sources so I thought to post it here even though it's not directly a PA skin problem...

]]>7181Mon, 26 Jan 2015 15:56:58 +0000How to make skin support both 5.0+ and 5.0- android versionhttps://forum.powerampapp.com/topic/7185-how-to-make-skin-support-both-50-and-50-android-version/Do I need to upload two different APKs in order to support 5.0+ and 5.0- ?

because ant dist-shared only works on 5.0+

And ant dist have problem on 5.0+ when using user's style as parent in some styles.

I notice in skin_custom_rules.XML the different of dist and dist-shared is the --shared-lib aapt manipulator.

]]>7086Tue, 06 Jan 2015 01:22:47 +0000Unable to run skin on 4.2 sony's romhttps://forum.powerampapp.com/topic/7106-unable-to-run-skin-on-42-sonys-rom/Hi, i have the big problem with skins on sony's rom.What i did? -

Just download poweramp_skin_sdk from github (last version).

Tried to build classic Poweramp skin. (the only modification i did is create src dirs and replace ${build.version} -> ${project.build.version} for prevent compiler issueses).

Everything goes fine except one thing - skin crash when i click on the launcher icon. Poweramp skin dialog show text - "Skin update requared". This happends only on sony's rom, on other devices everything fine.

*Note: I did read about similar question on this forum. I checked - skin-compat-debug.apk included in build (i just type ant debug in skin_compat folder).Also i found commented strings in skin_lib/res/values/public.xml file (content below) - Do i need to uncomment those lines?