PDA

View Full Version : wraplist focused item


Jeroen
2009-04-22, 23:08
I've been pretty much pulling my hair out over the following issue.
I have a horizontal wraplist that insists on resetting the focused item to the top level entry (the "level-up" entry so to say) after stopping playback instead of staying focused on the selected media entry. The same goes for re-entering the window after exiting.
I have compared my code to the wraplist in PM3.HD, which doesn't have this behaviour, to see if I could find any big differences. But no dice.

Here's my code:
http://pastebin.com/f61c199d8

I've tried removing all animation and such, but it didn't make a difference.


My fear is that something else, somewhere, is causing this behaviour. Unfortunately looking for this feels like looking for a neede in the haystack.
Basically I'm hoping someone has any ideas about what could be causing this.

Jezz_X
2009-04-23, 00:27
at a guess you have another container (list panel) with the ID 52 (probably different visible conditions) also included in the window and is higher up in the windows xml.

if you do just remove it for a test and I bet it works fine.
Solution use another ID

Jezz_X
2009-04-23, 00:33
Also "Slide" is not a valid view type though
<viewtype label="Slide">Slide</viewtype>
I don't think these are used anymore since jmarshall removed the media view type stuff from settings but was originally used to match similar views when changing skins and the user has one set allready

viewtype
The type of view. Choices are list, icon, wide, wrap, biglist, bigicon, bigwide, and bigwrap. The label attribute indicates the label that will be used in the "View As" control within the GUI. It is localizable via strings.xml.

Jmarshall might know if its still active though

jmarshall
2009-04-23, 04:47
I think that's still active when choosing which view to choose if the saved viewtype (id and type) is not present in the skin, so may well be related.

Jeroen
2009-04-23, 11:21
Ok guys many thanks for the pointers. I did not know the viewtype label was used for anything besides the naming of the viewtypes. And since I use a custom control for setting the viewtypes it did not occur to me.

IŽll definitely look into this

So, if I understand correctly using the same ID with different visibility conditions is generally not advised?
I use a <itemlayout condition="...> wherever possible, but sometimes I also need the container itself to have a different x or y-pos, size and such. Plus, I can use less code in the library windows for labels and thumbs and such.

Cheers

skunkm0nkee
2009-04-23, 11:51
You can use conditional includes (<include condition=...>MyInclude</include>) for the different positions etc, that way you can have one control with id 52 and then conditional code to work out how exactly that control is going to look and work

jmarshall
2009-04-23, 11:54
And you're not restricted to id 50 through 59 anymore anyway.

Jeroen
2009-04-23, 11:56
You can use conditional includes (<include condition=...>MyInclude</include>) for the different positions etc, that way you can have one control with id 52 and then conditional code to work out how exactly that control is going to look and work

Oh right of course, didnŽt think about that :cool: I guess I have a long way to go to get my code as efficient as yours ;)