Jump to content

Need Help with Skinning


titanic_fanatic

Recommended Posts

Hi there,

Over the past weekend I decided I would try to make a Poweramp skin :-)

I downloaded the skin-sdk and have my styles defined in myskinname_styles.xml, my colors defined in colors.xml and dimensions defined in dimens.xml I also have skins.xml with definitions about the skin.

I have included the necessary


<meta-data android:name="com.maxmpz.PowerampSkins" android:value="true"/>

in my AndroidManifest.xml so that Poweramp will pick it up as a skin. It compiles and installs to my device without error, but when I open Poweramp to switch to my skin, it is not in the list. Searching through my logcat reveals the following:


01-14 09:25:39.948 434 561 I ActivityManager: Displayed com.maxmpz.audioplayer/.SettingsActivity: +922ms
01-14 09:25:40.148 17232 17232 W ThemePreference: found skin theme=ClassicSkin name=ICS Skin id=-2146828288 app=com.ikorolkov.Poweramp.skins.ics
01-14 09:25:40.158 17232 17232 W ThemePreference: found skin theme=ClassicSkin name=ICS Purple id=-2146828288 app=com.ikorolkov.Poweramp.skins.icsp
01-14 09:25:40.168 17232 17232 W ResourceType: Skipping entry 0x80050000 in package table 0 because it is not complex!
01-14 09:25:40.178 17232 17232 E ThemePreference: Failed to get resources from app=com.nwwebdesign.Poweramp.skins.PurpleSilk
01-14 09:25:40.178 17232 17232 E ThemePreference: android.content.res.Resources$NotFoundException: Array resource ID #0x80050000
01-14 09:25:40.178 17232 17232 E ThemePreference: at android.content.res.Resources.obtainTypedArray(Resources.java:490)
01-14 09:25:40.178 17232 17232 E ThemePreference: at com.maxmpz.audioplayer.preference.ThemePreference.��(":97)
01-14 09:25:40.178 17232 17232 E ThemePreference: at com.maxmpz.audioplayer.preference.ThemePreference.��(":78)
01-14 09:25:40.178 17232 17232 E ThemePreference: at com.maxmpz.audioplayer.preference.ThemePreference.onPrepareDialogBuilder(":240)
01-14 09:25:40.178 17232 17232 E ThemePreference: at android.preference.DialogPreference.showDialog(DialogPreference.java:295)
01-14 09:25:40.178 17232 17232 E ThemePreference: at com.maxmpz.audioplayer.preference.ThemePreference.��(":334)
01-14 09:25:40.178 17232 17232 E ThemePreference: at com.maxmpz.audioplayer.preference.��$19.run(":798)
01-14 09:25:40.178 17232 17232 E ThemePreference: at android.os.Handler.handleCallback(Handler.java:615)
01-14 09:25:40.178 17232 17232 E ThemePreference: at android.os.Handler.dispatchMessage(Handler.java:92)
01-14 09:25:40.178 17232 17232 E ThemePreference: at android.os.Looper.loop(Looper.java:137)
01-14 09:25:40.178 17232 17232 E ThemePreference: at android.app.ActivityThread.main(ActivityThread.java:4931)
01-14 09:25:40.178 17232 17232 E ThemePreference: at java.lang.reflect.Method.invokeNative(Native Method)
01-14 09:25:40.178 17232 17232 E ThemePreference: at java.lang.reflect.Method.invoke(Method.java:511)
01-14 09:25:40.178 17232 17232 E ThemePreference: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
01-14 09:25:40.178 17232 17232 E ThemePreference: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
01-14 09:25:40.178 17232 17232 E ThemePreference: at dalvik.system.NativeStart.main(Native Method)
01-14 09:25:40.188 17232 17232 W ThemePreference: found skin theme=ClassicSkin name=Poweramp Holo id=-2147221504 app=com.maxmpz.Poweramp.skins.holo

It seems that this is related to resources that are not found, or are of the wrong type, so I searched the generated R.java file for resource ID 0x80050000 (assigned to dimension "coverMarginBottom") which was defined in my dimens.xml file. The value was the same as specified in the reference_resources (resource type should be correct... 184dip). I removed the resource all together and recompiled. When I did this, resource ID 0x80050000 was assigned to the next resource in my dimens.xml file and again caused the same error.


01-14 09:25:40.168 17232 17232 W ResourceType: Skipping entry 0x80050000 in package table 0 because it is not complex!

It seems that it does not matter what resource I remove, Poweramp always spits out the above error in my logcat about skipping entry 0x80050000 because it is not complex.

Any ideas as to what causes this error in the skinning process? I can't find anything about this error on google except for how to track down the offending value (which was to look in the generated R.java file to find the reference ID of the resource in question).

http://thesoftwarero...ge-table-0.html

What does it mean "because it is not complex"?

Any help would be graciously appreciated :-)

Titanic_Fanatic

Link to comment
Share on other sites

I totally figured it out :-)

It was in relation to the public.xml file (which I had deleted but shouldn't have). This file is needed to reserve resource id's for the 3 arrays that are required by Poweramp to establish your apk as a Poweramp skin. Without these resource id reservations, the id's get assigned to other resources in your apk and Poweramp can no longer determine that your apk is a skin as it seems to be looking for these arrays defined with these specific resource id's.

I will get my first skin done... Called "Purple Silk" then, if it is ok with max and the team at Poweramp, I would like to post a tutorial on skinning for Poweramp both on this forum and at the xda-developers forum :-)

What do you say guys?

Link to comment
Share on other sites

Sounds great to me, I (naively) rather expected skinning to be a simpler matter than it is. It's much more than just loading a file into an image editor, tweak it, and re-save it with a few new co-ordinates...

I initially only wanted to make a wider seek bar and move it up above the control buttons... but even a simple change like that is going to be a fair bit of work I think.

Andre

Link to comment
Share on other sites

  • 1 year later...

...I will get my first skin done...would like to post a tutorial on skinning...

 

Congrats titanic_fanatic, I see you have several skins available at the Play store. Nice!  If you're still deciding whether to write a skinning tutorial, please be adviced that you have at least one student ready to dig into it.  Max has been gratious enough to give us skinning information and forum threads, mostly in English, but it looks like Geek to me.  A tutorial would be most helpful and greatly appreciated.

Link to comment
Share on other sites

...only wanted to make a wider seek bar and move it up above the control buttons...

 

By now, Andre, you probably already know that the built-in Aluminum theme has the seek bar above control buttons. And when you touch the bar, it widens for you. My ideas about skinning are far more radical than that. For example, my dream skin would have no control buttons. Play/pause would be accomplish'd by tapping the song art. Jumping to the next or previous song (or the one after or before that) would be accomplished by taping the desired song in a section of the main UI screen where the current playlist queue would be display'd, and it would be scrollable by swiping up or down. Oh, and if you swipe left or right on the art area, it would toggle through a frequency spectrum analyzer, lyrics, artist bio, track and chart info, etc. and eventually, it would cycle back to art. Here's a quick sketch:

androSkin000.png

Link to comment
Share on other sites

By now, Andre, you probably already know that the built-in Aluminum theme has the seek bar above control buttons. And when you touch the bar, it widens for you.

Yeah, that one is much closer to what I'd like (the mid-screen position of the seek bar is nicer too), although visually I do prefer black background skins.

Actually, one of the issues I have with touch interfaces in general is that, by definition, your finger is often covering the very thing that you are trying to see to adjust, so there's very little of the precision that you get with a mouse-based interface. I like your idea of a completely separate slider thumb above the timeline bar for just that reason.

Andre

Link to comment
Share on other sites

...your finger is often covering the very thing that you are trying to see to adjust...

 

So true. You got me thinking outside the box of a needle on vinyl or sliderule radio dial; my seekbar is upside-down! By flipping it so the scale is above the slider, the needle point becomes essentially an extension of your fingertip, allowing very precise adjustment easily.

Flip.png

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...