/
merge_item_header.xml
251 lines (235 loc) · 10.9 KB
/
merge_item_header.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
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2010-2022 Maksim Petrov
Redistribution and use in source and binary forms, with or without
modification, are permitted for themes, skins, widgets, plugins, applications and other software
which communicate with Poweramp music player application on Android platform.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<merge xmlns:android="http://schemas.android.com/apk/res/android" xmlns:w="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools">
<!-- NOTE: (item) header can transition to/from scenes:
=> 0/defaultScene
=> scene_1
=> scene_zoomed
=> scene_1_zoomed
=> scene_grid
=> scene_grid_1
=> scene_grid_1_alt
=> scene_1_zoomed
=> scene_grid_zoomed
=> scene_grid_1_zoomed
=> scene_grid_1_alt_zoomed
=> scene_item_menu
=> scene_item_menu_lu (* generally not, as this is used only for AA main screen items)
=> scene_header - can't be transitioned from scene_aa
To avoid animation jump, all those scenes should be defined
Also:
=> scene_aa,
=> scene_aa_playing,
=> scene_aa_vis
- should be applied with GONE, to avoid any layout changes for the cached -> resused as AA item transition
NOTE: buttons are invisible in their default style/default scene (e.g. for style ItemHeaderShuffleButton),
visible in *_scene_header, and again invisible in *_scene_menu, but optionally positioned differently in *_scene_menu
(attached below line2, instead of bottom of view) for better animation to/from layouts with large item size, like scene_item_menu
-->
<!-- NOTE: this view is never visible in default themes, but can be used in 3rd party skins -->
<com.maxmpz.widget.base.AlphaDisabledView android:id="@+id/buttons_bg"
style="?ItemHeaderButtonsBg"
/>
<SceneParams w:scene="@+id/scene_zoomed" w:scene_2="@+id/scene_grid" w:scene_3="@+id/scene_grid_zoomed" w:scene_4="@+id/scene_small"
w:scene_5="@+id/scene_1_small"
w:baseScene="defaultScene"
/>
<!-- Ensure we do not alter layout in any way while possible transitioning from header -> aa (happens for chached items) -->
<SceneParams w:scene="@id/scene_aa" w:scene_2="@id/scene_aa_playing" w:scene_3="@id/scene_aa_vis"
android:visibility="gone"
/>
<SceneParams w:scene="@+id/scene_1" w:scene_2="@+id/scene_1_zoomed" w:scene_3="@+id/scene_grid_1" w:scene_4="@+id/scene_grid_1_zoomed"
w:scene_5="@+id/scene_grid_1_alt" w:scene_6="@+id/scene_grid_1_alt_zoomed"
w:baseScene="defaultScene"
/>
<SceneParams w:scene="@+id/scene_small_no_aa" w:scene_2="@+id/scene_1_small_no_aa"
w:baseScene="defaultScene"
/>
<SceneParams w:scene="@+id/scene_item_menu" w:scene_2="@+id/scene_item_menu_lu"
android:visibility="gone"
/>
<SceneParams w:scene="@+id/scene_header" w:scene_2="@+id/scene_header_1"
style="?ItemHeaderButtonsBg_scene_header"
/>
<SceneParams w:scene="@+id/scene_bottom_toolbar"
style="?ItemHeaderButtonsBg_scene_bottom_toolbar"
/>
<!-- buttons_bg -->
<com.maxmpz.widget.base.BusActionButton android:id="@+id/shuffle_button"
style="?ItemHeaderShuffleButton"
w:busId="@id/list"
w:msgId="@id/cmd_list_shuffle"
android:contentDescription="@string/shuffle"
/>
<SceneParams w:scene="@+id/scene_zoomed" w:scene_2="@+id/scene_grid" w:scene_3="@+id/scene_grid_zoomed" w:scene_4="@+id/scene_small"
w:scene_5="@+id/scene_1_small"
w:baseScene="defaultScene"
/>
<!-- Ensure we do not alter layout in any way while possible transitioning from header -> aa (happens for chached items) -->
<SceneParams w:scene="@id/scene_aa" w:scene_2="@id/scene_aa_playing" w:scene_3="@id/scene_aa_vis"
android:visibility="gone"
/>
<SceneParams w:scene="@+id/scene_1" w:scene_2="@+id/scene_1_zoomed" w:scene_3="@+id/scene_grid_1" w:scene_4="@+id/scene_grid_1_zoomed"
w:scene_5="@+id/scene_grid_1_alt" w:scene_6="@+id/scene_grid_1_alt_zoomed"
w:baseScene="defaultScene"
/>
<SceneParams w:scene="@+id/scene_1_small_no_aa" w:scene_2="@+id/scene_small_no_aa"
w:baseScene="defaultScene"
/>
<SceneParams w:scene="@+id/scene_item_menu" w:scene_2="@+id/scene_item_menu_lu"
style="?ItemHeaderShuffleButton_scene_menu"
/>
<SceneParams w:scene="@+id/scene_header" w:scene_2="@+id/scene_header_1"
style="?ItemHeaderShuffleButton_scene_header"
/>
<SceneParams w:scene="@+id/scene_bottom_toolbar"
style="?ItemHeaderShuffleButton_scene_bottom_toolbar"
/>
<!-- shuffle_button -->
<com.maxmpz.widget.base.BusActionButton android:id="@+id/play_button"
style="?ItemHeaderPlayButton"
w:busId="@id/list"
w:msgId="@id/cmd_list_play"
android:contentDescription="@string/play"
/>
<SceneParams w:scene="@+id/scene_zoomed" w:scene_2="@+id/scene_grid" w:scene_3="@+id/scene_grid_zoomed" w:scene_4="@+id/scene_small"
w:scene_5="@+id/scene_1_small"
w:baseScene="defaultScene"
/>
<!-- Ensure we do not alter layout in any way while possible transitioning from header -> aa (happens for chached items) -->
<SceneParams w:scene="@id/scene_aa" w:scene_2="@id/scene_aa_playing" w:scene_3="@id/scene_aa_vis"
android:visibility="gone"
/>
<SceneParams w:scene="@+id/scene_1" w:scene_2="@+id/scene_1_zoomed" w:scene_3="@+id/scene_grid_1" w:scene_4="@+id/scene_grid_1_zoomed"
w:scene_5="@+id/scene_grid_1_alt" w:scene_6="@+id/scene_grid_1_alt_zoomed"
w:baseScene="defaultScene"
/>
<SceneParams w:scene="@+id/scene_1_small_no_aa" w:scene_2="@+id/scene_small_no_aa"
w:baseScene="defaultScene"
/>
<SceneParams w:scene="@+id/scene_item_menu" w:scene_2="@+id/scene_item_menu_lu"
style="?ItemHeaderPlayButton_scene_menu"
/>
<SceneParams w:scene="@+id/scene_header" w:scene_2="@+id/scene_header_1"
style="?ItemHeaderPlayButton_scene_header"
/>
<SceneParams w:scene="@+id/scene_bottom_toolbar"
style="?ItemHeaderPlayButton_scene_bottom_toolbar"
/>
<!-- play_button -->
<!-- NOTE: invisible by default -->
<com.maxmpz.widget.base.BusActionButton android:id="@+id/search_button"
style="?ItemHeaderSearchButton"
w:busId="@id/list"
w:msgId="@id/cmd_list_target_search"
android:contentDescription="@string/search"
/>
<SceneParams w:scene="@+id/scene_zoomed" w:scene_2="@+id/scene_grid" w:scene_3="@+id/scene_grid_zoomed" w:scene_4="@+id/scene_small"
w:scene_5="@+id/scene_1_small"
w:baseScene="defaultScene"
w:applyEvenIfGone="dontApplyIfGone"
/>
<!-- Ensure we do not alter layout in any way while possible transitioning from header -> aa (happens for chached items) -->
<SceneParams w:scene="@id/scene_aa" w:scene_2="@id/scene_aa_playing" w:scene_3="@id/scene_aa_vis"
android:visibility="gone"
/>
<SceneParams w:scene="@+id/scene_1" w:scene_2="@+id/scene_1_zoomed" w:scene_3="@+id/scene_grid_1" w:scene_4="@+id/scene_grid_1_zoomed"
w:scene_5="@+id/scene_grid_1_alt" w:scene_6="@+id/scene_grid_1_alt_zoomed"
w:baseScene="defaultScene"
w:applyEvenIfGone="dontApplyIfGone"
/>
<SceneParams w:scene="@+id/scene_1_small_no_aa" w:scene_2="@+id/scene_small_no_aa"
w:baseScene="defaultScene"
w:applyEvenIfGone="dontApplyIfGone"
/>
<SceneParams w:scene="@+id/scene_item_menu" w:scene_2="@+id/scene_item_menu_lu"
style="?ItemHeaderSearchButton_scene_menu"
/>
<SceneParams w:scene="@+id/scene_header" w:scene_2="@+id/scene_header_1"
style="?ItemHeaderSearchButton_scene_header"
/>
<SceneParams w:scene="@+id/scene_bottom_toolbar"
style="?ItemHeaderSearchButton_scene_bottom_toolbar"
/>
<!-- search_button -->
<com.maxmpz.widget.base.BusActionButton android:id="@+id/select_button"
style="?ItemHeaderSelectButton"
android:text="@string/select"
w:busId="@id/list"
w:msgId="@id/cmd_list_toggle_selection_mode"
/>
<SceneParams w:scene="@+id/scene_zoomed" w:scene_2="@+id/scene_grid" w:scene_3="@+id/scene_grid_zoomed" w:scene_4="@+id/scene_small"
w:scene_5="@+id/scene_1_small"
w:baseScene="defaultScene"
/>
<SceneParams w:scene="@+id/scene_1" w:scene_2="@+id/scene_1_zoomed" w:scene_3="@+id/scene_grid_1" w:scene_4="@+id/scene_grid_1_zoomed"
w:scene_5="@+id/scene_grid_1_alt" w:scene_6="@+id/scene_grid_1_alt_zoomed"
w:baseScene="defaultScene"
/>
<!-- Ensure we do not alter layout in any way while possible transitioning from header -> aa (happens for chached items) -->
<SceneParams w:scene="@id/scene_aa" w:scene_2="@id/scene_aa_playing" w:scene_3="@id/scene_aa_vis"
android:visibility="gone"
/>
<SceneParams w:scene="@+id/scene_1_small_no_aa" w:scene_2="@+id/scene_small_no_aa"
w:baseScene="defaultScene"
/>
<SceneParams w:scene="@+id/scene_item_menu" w:scene_2="@+id/scene_item_menu_lu"
style="?ItemHeaderSelectButton_scene_menu"
/>
<SceneParams w:scene="@+id/scene_header" w:scene_2="@+id/scene_header_1"
style="?ItemHeaderSelectButton_scene_header"
/>
<SceneParams w:scene="@+id/scene_bottom_toolbar"
style="?ItemHeaderSelectButton_scene_bottom_toolbar"
/>
<!-- select_button -->
<!-- Invisible to allow position anim -->
<com.maxmpz.widget.player.ScanProgress
style="?ItemHeaderScanProgress"
android:visibility="invisible"
/>
<SceneParams w:scene="@+id/scene_item_menu" w:scene_2="@+id/scene_item_menu_lu"
style="?ItemHeaderScanProgress_scene_item_menu"
/>
<!-- Ensure we do not alter layout in any way while possible transitioning from header -> aa (happens for chached items) -->
<SceneParams w:scene="@id/scene_aa" w:scene_2="@id/scene_aa_playing" w:scene_3="@id/scene_aa_vis"
android:visibility="gone"
/>
<SceneParams w:scene="@+id/scene_header" w:scene_2="@+id/scene_header_1"
style="?ItemHeaderScanProgress_scene_header"
/>
<!-- NOTE: needed to avoid jump from/to grid scene -->
<SceneParams w:scene="@+id/scene_zoomed" w:scene_2="@+id/scene_grid" w:scene_3="@+id/scene_grid_zoomed" w:scene_4="@+id/scene_small"
w:scene_5="@+id/scene_1_small"
w:baseScene="defaultScene"
android:visibility="invisible"
/>
<SceneParams w:scene="@+id/scene_1_small_no_aa" w:scene_2="@+id/scene_small_no_aa"
w:baseScene="defaultScene"
android:visibility="invisible"
/>
<SceneParams w:scene="@+id/scene_bottom_toolbar"
style="?ItemHeaderScanProgress_scene_bottom_toolbar"
/>
<SceneParams w:scene="@+id/scene_1" w:scene_2="@+id/scene_1_zoomed" w:scene_3="@+id/scene_grid_1" w:scene_4="@+id/scene_grid_1_zoomed"
w:scene_5="@+id/scene_grid_1_alt" w:scene_6="@+id/scene_grid_1_alt_zoomed"
w:baseScene="defaultScene"
android:visibility="invisible"
/>
</merge>