Jump to content

Recommended Posts

Solved the menu icon However, the 

com.maxmpz.audioplayer:ItemTrackMenu

is used on the main albumart where I set background transparent BUT also in another scenes where you select a category such as genres, rock

In my view this level should also display ItemTrackMenu as in the other Library scenes where the background is set

An example is shown in the rhs screenshot

genres_duo.png

Share this post


Link to post
Share on other sites

It turns out the icons shown above each individual library category (eg all songs, albums etc) is the same icon as the icons shown in the library top view. 

Remains

1. the search icon

- it does not have the same style applied as other icons in Poweramp ( com.maxmpz.audioplayer:colorIconPrimary)

- went through all the xml files and did not find any reference to it

- at the category level eg Genre, Rock, it changes to white but  no icon style  com.maxmpz.audioplayer:colorIconPrimary

2. the different style of the ItemTrackMenuItem also at the eg Genre, Rock level

 

@maxmp can you confirm/comment on the 2 points above

library.png

Share this post


Link to post
Share on other sites

@flyingdutchman Search icon style has the same definition as other (header) icons.

You can redefine its background on multiple levels:

- you can change icon style itself:

<style name="SampleSkin" parent="com.maxmpz.audioplayer:style/Base_ActivityTheme_Default">
    ...
	<item name="com.maxmpz.audioplayer:ItemHeaderSearchButton">@style/ItemHeaderSearchButton</item>
    ...
</style>
...
<style name="ItemHeaderSearchButton" parent="com.maxmpz.audioplayer:ItemHeaderSearchButton">
	<item name="android:background">@drawable/ripple_button</item>
</style>

- or you can change the color which is used in the button drawables (colorBgInverse) - this will change all the appropriate backgrounds as well:

<item name="com.maxmpz.audioplayer:colorBgInverse">#00f</item>

 

Share this post


Link to post
Share on other sites
On 9/29/2019 at 1:46 PM, maxmp said:

@flyingdutchman Search icon style has the same definition as other (header) icons.

You can redefine its background on multiple levels:

- you can change icon style itself:


<style name="SampleSkin" parent="com.maxmpz.audioplayer:style/Base_ActivityTheme_Default">
    ...
	<item name="com.maxmpz.audioplayer:ItemHeaderSearchButton">@style/ItemHeaderSearchButton</item>
    ...
</style>
...
<style name="ItemHeaderSearchButton" parent="com.maxmpz.audioplayer:ItemHeaderSearchButton">
	<item name="android:background">@drawable/ripple_button</item>
</style>

- or you can change the color which is used in the button drawables (colorBgInverse) - this will change all the appropriate backgrounds as well:


<item name="com.maxmpz.audioplayer:colorBgInverse">#00f</item>

 

 

@maxmp, still struggling to find the artifacts for the lowest level. (see screenshot with arrow) I think I understand the naming, indicating certain levels and that I am dealing with ItemText... In Itemtext.xml  you indicate the levels

    Special:    
    - header
    - scene_top_header
    - scene_search_header
    - menu
    == +4
    
    Total: 6

I have overridden 

        <item name="ItemTextMenu">@style/ItemTextMenu</item>
        <item name="ItemTextMenu_scene_menu">@style/ItemTextMenu_scene_menu</item>
        <item name="ItemTextMenu_scene_header">@style/ItemTextMenu_scene_header</item>
        <item name="ItemTextMenu_scene_search_header">@style/ItemTextMenu_scene_search_header</item>
        <item name="ItemTextMenu_scene_top_header">@style/ItemTextMenu_scene_top_header</item>
but to no avail.

I would really appreciate your help with this one.

 

menu.png

Share this post


Link to post
Share on other sites

@maxmp I checked all artifacts with Menu references but was unable to find the menu showing at the lowest level. Can you give me a hint please ?

ItemTextAAImage_scene_item_menu
ItemTextTitle_scene_item_menu
ItemTextLine2_scene_item_menu
ItemTextMenu
ItemTextMenu_scene_menu
ItemTextMenu_scene_search_header
ItemTextMenu_scene_header
ItemTextMenu_scene_top_header
ItemTextHeaderSelectButton_scene_menu

ItemTrackCatImage_scene_item_menu  ( error: resource com.maxmpz.audioplayer:style/ItemTrackCatImage_scene_item_menu not found. )

Share this post


Link to post
Share on other sites

I believe I finally resolved it. This style had the effect of showing the default black circle with 3 dots. By removing it it seems all is now behaving as expected

<style name="yaps_ItemTrackMenu_hide" parent="com.maxmpz.audioplayer:ItemTrackMenu">
    <item name="android:visibility">invisible</item>

</style>

Share this post


Link to post
Share on other sites

Ok, thanks for the info.

The default theme is spread over multiple files. Usually those named like "styles-x.xml" where x is a style prefix, e.g. styles-top.xml for "TopPlay" style. But it's just easier to do a files search over (reference resource) xmls to find definition/references.

Share this post


Link to post
Share on other sites

@maxmp, struggling with displaying a properly rounded coloured seekbar and would appreciate some help.

in attrs-powerui.xml you state:

"<!-- NOTE: barBitmap/elapsedBarBitmap/barBitmap2/elapsedBarBitmap2 are specifically crafted bitmaps. Height of the bitmap should be >= width of the bitmap.
             Bitmap is stretched in a way similar to 9-patch images, but only 3 "patches" used - top, middle, bottom.
             Top is unstretched, height=width*0.5, bottom is unstretched, height=width*0.5 and reset is stretched middle."

Question:

As 9 patch does not provide the correct png, how is "specifically crafted" achieved. Photoshop? 

Also the sentence

  Top is unstretched, height=width*0.5, bottom is unstretched, height=width*0.5 and reset is stretched middle."

I find totally confusing., if top is unstretched, what does the height=width*0.5 refer to eg for a png 32*68 px this would be 16. Neither do i understand "reset is stretched middle."

Can you provide some additional clarification please?

Share this post


Link to post
Share on other sites

@flyingdutchman right, 9.png were considered, but unfortunately it's very slow to draw 100x of them, so just plain png is used with the predefined proportions. The shrinking or stretching happens only for the middle part, and only vertically.

Graphical explanation:

 

1.jpg

Share this post


Link to post
Share on other sites

 

@maxmp there appears to be some inconsistent behaviour with regards to background in popuplists

 <style name="PopupMenuItem" parent="com.maxmpz.audioplayer:PopupMenuItem">
        <!--used lists eg library menu options,  -->
        <item name="android:background">@color/md_red_700</item>
    </style>
    <style name="ItemPopupList" parent="com.maxmpz.audioplayer:ItemPopupList">
        <!--used by ReverbPreset -->
        <item name="android:background">?colorMenuBgColor</item>
    </style>
    <style name="PopupListLayoutList" parent="com.maxmpz.audioplayer:PopupListLayoutList">
        <item name="android:background">?colorMenuBgColor</item>
    </style>

colorMenuBgColor=lime

when long clicking the Albumart, the following is the result

image.png.e60edab8b08916cf130d665565fba97c.png

When clicking EqEqPreset,

image.png.238783087a30bef7202f62a548c73427.png

and then to EqReverbPreset

image.png.ad83d440ce2270f58ffd5046cb96abbd.png

 

The style applied to the EqReverb is defined in the ItemPopupList whereas the EqEqPreset uses a different style.

It appear that  EqEqPreset, takes on the value of colorBgPrimary

There appears to be a mixture of styles to popup menus where I would expect the same behaviour.

Update:

Having identified a number of artifacts (see below) , Still hunting for the background setting for the EqEqPreset


 

    <style name="ItemPopupList" parent="com.maxmpz.audioplayer:ItemPopupList">
        <!--used by ReverbPreset -->
    <style name="PopupMenuItem" parent="com.maxmpz.audioplayer:PopupMenuItem">
        <!--used lists eg library menu options, long click albumart( top 3 lines -->

    <style name="EqPresetListLayout" parent="com.maxmpz.audioplayer:EqPresetListLayout">
error message:        style attribute 'com.maxmpz.audioplayer:attr/EqPresetListLayout' not found.
    </style>
    <style name="PopupDialogListLayoutList" parent="com.maxmpz.audioplayer:PopupDialogListLayoutList">
error message:        style attribute 'com.maxmpz.audioplayer:attr/EqPresetListLayout' not found.
    </style>

 

Finally found it

ItemEqPreset

 

 

Share this post


Link to post
Share on other sites
51 minutes ago, flyingdutchman said:

@maxmp there appears to be some inconsistent behaviour with regards to background in popuplists

when long clicking the Albumart, the following is the result

Actually I'd noticed that too (my normal b/g is pretty dark so it was fairly subtle) and was going to mention it.  I've changed my b/g colour a bit to show it more clearly:

image.png

It also happens in another three-dots menu somewhere, but annoyingly I can't remember where.

Andre

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...