forked from maxmpz/powerampapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
skins.xml
520 lines (477 loc) · 14.8 KB
/
skins.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
<?xml version="1.0" encoding="utf-8"?>
<skins targetBuild="949">
<!-- NOTE: forceGlobalOptions=true means global options (by default in styles-options.xml) will force-override base skin attributes.
By default, global options do not override base skin theme, just add to it,
but for more complicated cases, overriding may be required (e.g. for our own OptionCounter here)-->
<skin
name="@string/skin_sample"
author="@string/skin_author"
description="@string/skin_sample_description"
style="@style/SampleSkin"
forceGlobalOptions="true"
darkMode="@style/SampleSkinDark"
allowNewPadding="true"
>
<!-- Since 866. The category and page tags define 2 types of option categories. The <category> tag is just a grouping header in skin settings.
The <page> tag defines settings sub-page.
Both <category> and <page> tags are ignored prior build 866 (just plain list of options is shown) -->
<category name="@string/skin_basic_options">
<!-- We set floatScale 100 here, meaning 100 = 1.0, 50 = 0.5, 200 = 2.0 -->
<seekbar
key="searchEditFontSize"
id="@+id/searchEditFontSize"
name="@string/skin_searchEditFontSize"
summary="@string/skin_summary_fontSize"
summary2="@string/skin_size_2f"
leftLabel="@string/skin_smaller"
centerLabel="@string/skin_normal"
rightLabel="@string/skin_larger"
floatScale="1000"
scale="1000"
defaultValue="1000"
min="500"
max="1500"
step="125"
ticks="true"
/>
<seekbar
key="titleLine2FontSize"
id="@+id/titleLine2FontSize"
name="@string/skin_title_line2_fontSize"
summary="@string/skin_size_2f"
leftLabel="@string/skin_smaller"
centerLabel="@string/skin_normal"
rightLabel="@string/skin_larger"
floatScale="1000"
scale="1000"
defaultValue="1000"
min="500"
max="1500"
step="125"
ticks="true"
/>
<!-- (build 842+) Custom loadable fonts -->
<radio
key="font"
name="@string/skin_font"
defaultValue=""
>
<option
name="@string/_default"
overlapStyle=""
/>
<option
name="@string/skin_opensans_font"
overlapStyle="@style/SampleSkin_OpenSansFont"
/>
<option
name="@string/skin_ubuntu_font"
overlapStyle="@style/SampleSkin_UbuntuFont"
/>
</radio>
</category>
<!-- Checkable option. In this case we use built-in ActivityTheme_Whitepro_StaticSeekbar substyle. We may need own substyle if we modify theme more -->
<option
key="static_seekbar"
name="@string/skin_static_seekbar"
overlapStyle="@com.maxmpz.audioplayer:style/ActivityTheme_Whitepro_StaticSeekbar"
checkedByDefault="false"
/>
<msg
line1="Some hint title here"
smallLine1="Some hint message here"
/>
<radio
key="alt_layout_radio"
name="@string/skin_alt_layout"
summary="@string/skin_summary_alt_layout"
defaultValue=""
>
<!-- Alternative layout which uses default Poweramp "alternative" layout styles.
For the custom detailed alternative layout implementation, see SampleSkinAAA.
overlapAttr here means we'll add extra style based on current overlap_alt_layout attribute value, which is:
- @com.maxmpz.audioplayer:style/ActivityTheme_Whitepro_AltLayout - by default
- @com.maxmpz.audioplayer:style/ActivityTheme_Whitepro_AltLayout_StarsMenu - for OptionRatingStarsMenu
You can check those styles in reference_resources.
Alternative styles change main and items layout as needed - no further redefines are needed.
If you want more control over alternative layout, see SampleSkinAAA or new SampleSkin_Alt -->
-->
<option
name="@string/skin_disabled"
overlapStyle=""
/>
<option
name="@string/skin_alt_layout_default"
overlapAttr="@com.maxmpz.audioplayer:attr/overlap_alt_layout"
/>
<option
name="@string/skin_alt_layout_centered"
overlapStyle="@style/SampleSkin_Alt_Centered"
/>
</radio>
<page name="@string/skin_corners">
<!-- It's recommended to use switch to enable/disable the new seekbar based style as they are not supported prior build 866.
Alternatively, <include> can be used to include this page just for builds 866+ (prior builds ignore <include>) -->
<option
key="dynamicCorners"
name="@string/skin_dynamicCorners"
summary="@string/skin_summary_dynamicCorners"
overlapStyle="@style/SampleSkin_dynamicCorners"
/>
<!-- Corner radiuses. Value is dp, but still should be float (floatScale should be defined) -->
<seekbar
key="cornersAA"
id="@+id/cornersAA"
dependency="dynamicCorners"
name="@string/skin_cornerRadiusAA"
summary="%.0fdp"
floatScale="1"
scale="1"
defaultValue="4"
min="-1"
max="64"
step="1"
/>
<seekbar
key="cornersTracks"
id="@+id/cornersTracks"
dependency="dynamicCorners"
name="@string/skin_cornerRadiusTracks"
summary="%.0fdp"
floatScale="1"
scale="1"
defaultValue="4"
min="-1"
max="64"
step="1"
/>
<seekbar
key="cornersAlbums"
id="@+id/cornersAlbums"
dependency="dynamicCorners"
name="@string/skin_cornerRadiusAlbums"
summary="%.0fdp"
floatScale="1"
scale="1"
defaultValue="4"
min="-1"
max="64"
step="1"
/>
<seekbar
key="cornersOther"
id="@+id/cornersOther"
dependency="dynamicCorners"
name="@string/skin_cornerRadiusOther"
summary="%.0fdp"
floatScale="1"
scale="1"
defaultValue="4"
min="-1"
max="64"
step="1"
/>
</page>
<page
name="@string/skin_aa_options"
>
<!-- It's recommended to use switch to enable/disable the new seekbar based style as they are not supported prior build 866.
Alternatively, <include> can be used to include this page just for builds 866+ (prior builds ignore <include>) -->
<option
key="aaOptions"
name="@string/skin_aa_options"
summary="@string/skin_summary_866only"
overlapStyle="@style/SampleSkin_aaOptions"
/>
<!-- (build 866+) new aa-related seekbar controlled options -->
<seekbar
key="aaMaxYRotation"
id="@+id/aaMaxYRotation"
dependency="aaOptions"
name="@string/skin_aaMaxYRotation"
summary="@string/skin_summary_aaMaxYRotation"
summary2="%.2f"
floatScale="100"
scale="100"
defaultValue="-1000"
min="-3000"
max="3000"
step="10"
/>
<seekbar
key="aaMaxZRotation"
id="@+id/aaMaxZRotation"
dependency="aaOptions"
name="@string/skin_aaMaxZRotation"
summary="@string/skin_summary_aaMaxZRotation"
summary2="%.2f"
floatScale="100"
scale="100"
defaultValue="550"
min="-3000"
max="3000"
step="10"
/>
<seekbar
key="aaDenseFactor"
id="@+id/aaDenseFactor"
dependency="aaOptions"
name="@string/skin_aaDenseFactor"
summary="@string/skin_summary_aaDenseFactor"
summary2="%.2f"
floatScale="100"
scale="100"
defaultValue="75"
min="25"
max="200"
step="5"
/>
<!-- (build 866+). Same as <radio>, but uses seekbar with ticks to select the style from the fixed set of options.
NOTE: summary2 requires string placeholder (%s) as value is inserted as string from the child option name attribute-->
<seekbarOptions
key="aaScaleStyle"
name="@string/skin_aaScale"
dependency="aaOptions"
summary="@string/skin_summary_aaScale"
summary2="%s"
leftLabel="@string/skin_smaller"
centerLabel="@string/skin_normal"
rightLabel="@string/skin_larger"
defaultValue="@style/SampleSkin_aaScale_1"
>
<option
name="0.75"
overlapStyle="@style/SampleSkin_aaScale_075"
/>
<option
name="0.8"
overlapStyle="@style/SampleSkin_aaScale_08"
/>
<option
name="0.85"
overlapSt5yle="@style/SampleSkin_aaScale_085"
/>
<option
name="0.9"
overlapStyle="@style/SampleSkin_aaScale_09"
/>
<option
name="0.95"
overlapStyle="@style/SampleSkin_aaScale_095"
/>
<option
name="1.00"
overlapStyle="@style/SampleSkin_aaScale_1"
/>
<option
name="1.1"
overlapStyle="@style/SampleSkin_aaScale_11"
/>
<option
name="1.15"
overlapStyle="@style/SampleSkin_aaScale_115"
/>
<option
name="1.25"
overlapStyle="@style/SampleSkin_aaScale_125"
/>
<option
name="1.33"
overlapStyle="@style/SampleSkin_aaScale_133"
/>
<option
name="1.5"
overlapStyle="@style/SampleSkin_aaScale_15"
/>
</seekbarOptions>
<seekbar
key="aaMaxScale"
id="@+id/aaMaxScale"
dependency="aaOptions"
name="@string/skin_aaMaxScale"
summary="@string/skin_summary_aaMaxScale"
summary2="%.2f"
floatScale="100"
scale="100"
defaultValue="50"
min="25"
max="200"
/>
</page>
<!-- (build 810+) Both name and summary labels support limited html (see https://developer.android.com/reference/android/text/Html). Can be useful to for e.g. colors.
See strings.xml for some examples.
-->
<option
key="color1"
name="@string/skin_text_color1"
overlapStyle="@style/SampleSkin_color1"
checkedByDefault="false"
/>
<!-- (build 810+) radio / popup - an option selectable from the number of available options -->
<!--
Multiple "radio" button options.
defaultValue is the style selected and applied by default.
defaultValue can be an empty string "" (or can be missing) - this indicates that none of the options are selected nor applied.
Preferable, one of the child options should have defaultValue value too (or be an empty/missing), otherwise some unspecified option will be shown for defaultValue
name and summary are optional for <radio>
-->
<radio
key="color2"
name="@string/skin_select_text_color"
summary="@string/skin_summary_select_text_color"
defaultValue=""
>
<!-- name is the required attribute. summary is optional, key is ignored -->
<option
name="@string/skin_default"
summary="@string/skin_summary_default"
overlapStyle=""
/>
<option
name="@string/skin_red"
summary="@string/skin_red_w_color"
overlapStyle="@style/SampleSkin_color_red"
/>
<option
name="@string/skin_green"
summary="@string/skin_green_w_color"
overlapStyle="@style/SampleSkin_color_green"
/>
<option
name="@string/skin_blue"
summary="@string/skin_blue_w_color"
overlapStyle="@style/SampleSkin_color_blue"
/>
</radio>
<!--
Multiple options in a popup.
defaultValue is the style selected and applied by default.
defaultValue can be an empty string "" (or can be missing) - this indicates that none of the options are selected nor applied.
Preferable, one of the child options should have defaultValue value too (or be an empty/missing), otherwise some unspecified option will be shown for defaultValue
popup name and summary are optional.
popup name doesn't support html as it's used for dialog title.
popup summary can include %s => that is replaced by the selected option name
-->
<popup
key="bg_color"
name="@string/skin_select_bg_color"
summary="@string/skin_summary_select_bg_color_s"
>
<!-- name is the required attribute. summary is ignored, key is ignored -->
<option
name="@string/skin_default"
overlapStyle=""
/>
<option
name="@string/skin_red_w_color"
overlapStyle="@style/SampleSkin_bg_color_red"
/>
<option
name="@string/skin_green_w_color"
overlapStyle="@style/SampleSkin_bg_color_green"
/>
<option
name="@string/skin_blue_w_color"
overlapStyle="@style/SampleSkin_bg_color_blue"
/>
</popup>
<page
name="@string/skin_page_1"
summary="@string/skin_page_1_summary"
icon="@drawable/app_icon"
>
<!-- Option to make app background transparent in main player UI -->
<option
key="trans_bg_main"
name="@string/skin_trans_bg_main"
summary="@string/skin_summary_trans_bg_main"
overlapStyle="@style/SampleSkin_transBgMain"
checkedByDefault="false"
/>
<!-- Let's add our skin unique option which makes navigation bars fully transparent -->
<option
key="trans_navbar"
name="@string/skin_transparent_navbar"
summary="@string/skin_summary_transparent_navbar"
overlapStyle="@style/SampleSkin_transparentNavbar"
checkedByDefault="false"
/>
<option
key="divided_waveseek"
name="@string/skin_divided_waveseek"
summary="@string/skin_summary_divided_waveseek"
overlapStyle="@style/SampleSkin_dividedWaveseek"
checkedByDefault="false"
/>
</page>
<option
key="no_aa_blur"
name="@string/skin_no_aa_blur"
summary="@string/skin_summary_no_aa_blur"
overlapStyle="@style/SampleSkin_noAABlur"
checkedByDefault="false"
/>
<!-- Demonstrates mini spectrum on main screen via custom merged layout -->
<option
key="main_mini_spectrum"
name="@string/skin_main_mini_spectrum"
summary="@string/skin_summary_main_mini_spectrum"
overlapStyle="@style/SampleSkin_mainMiniSpectrum"
checkedByDefault="false"
/>
<!-- Demonstrates volume knob on main screen via custom merged layout -->
<option
key="volume_knob"
name="@string/skin_volume_knob"
summary="@string/skin_summary_volume_knob"
overlapStyle="@style/SampleSkin_VolumeKnob"
checkedByDefault="false"
/>
<option
key="useless_option"
name="Useless option"
summary="Some useless option which controls availability of the page below"
overlapStyle="@style/SampleSkin_Useless"
/>
<!-- Pages and categories can be organized in hierarchies, though for categories this makes little sense as category visually is just a header -->
<page
name="Another sub page"
summary="Demonstrating sub pages and sub categories"
icon="@drawable/app_icon"
dependency="useless_option"
>
<category name="Sub page category">
</category>
<page name="Another sub-sub page">
<page name="Another sub-sub-sub page">
<category name="Sub-sub-sub page category">
<option
key="_dummy"
name="Some dummy sub-sub-sub page option"
overlapStyle="@style/SampleSkin_VolumeKnob"
/>
</category>
</page>
<category name="Sub-sub page category">
</category>
</page>
</page>
<!-- Include tag includes skin definition from other xml files.
Include is supported by build 866+ and ignored by the builds prior that -->
<include file="@xml/skin_sample_subpage2"/>
</skin>
<skin
name="@string/skin_sample_dark"
author="@string/skin_author"
description="@string/skin_sample_description"
style="@style/SampleSkinDark"
forceGlobalOptions="true"
lightMode="@style/SampleSkin"
>
<!-- Empty skin just to demonstrate follow system light/dark mode.
Real skin will include same options as light version, options can differ (and should, e.g. in colors/backgrounds) as needed.
Also, common options can be shared between skins by using include tag -->
</skin>
<!-- Include is supported by build 866+ and ignored by the builds prior that -->
<include file="@xml/skin_sample_aaa"/>
</skins>