Big problem with scroller and repeat=always

A place for App developers to hang out / post
Post Reply
MrNorth

Posts: 60
Joined: Sat May 18, 2013 9:46 am
Location:

HTPC Specs: Show details

Big problem with scroller and repeat=always

#1

Post by MrNorth » Wed Feb 12, 2014 12:56 am

Hi!

I ahve a very strange issue. My app looks pretty much like the movie gallery in WMC, at the top I have a pivot that selects categories and below I have a scroller/repeater for the galleryitems.

My problem is when there is only 1 or 2 items in the gallery. I dont know how WMC handles repeaters with repeat=always, but it is not working out very well for me.

Problems:

1) When 1 or 2 items, they appear in the middle of the screen, if I have many items, they start from the left.

2) If I for category A in the gallery browse back to a negative index and then to category B with only 1 item, the gallery is empty. When I press down to give the gallery focus, the item appeared, it was hidden in the "negative side", e.g. outside the view area. I have rememberfocus set on the gallery.


So, my questions to the gurus is:

1) Does the scroller really handle repeat= always and 1 or 2 items properly? It seems very confused by the way it renders it. Or is there any layout item I missed?

2) I use the same scroller for all categories, I simply do a rebind of the data. Is there any way to make the scroller forget the focused index when changing data? I tried the classic ScrollerData.Home, but then it played the move animation + it gave the gallery focus automatically (I want the category pivot to have focus until I press down to navigate to the gallery actively.

Gaaah! I could never imagined having so much trouble with the repeater. It works sooo nice with lots of items!!

/H

MrNorth

Posts: 60
Joined: Sat May 18, 2013 9:46 am
Location:

HTPC Specs: Show details

#2

Post by MrNorth » Wed Feb 12, 2014 1:43 am

Have done some more investigations, and it is a problem for whenever there is not enough items to fill the screen. If I navigate back to negative index and then to a category with a few items, then they are outside the bounds of the screen. Only when I give the gallery focus will they "jump" back into view.


I definetly need a way to reload or kill the entire repeater and scroller so I begin from scratc when the user changes category. How do I do that in MCML? I want completly new repeater and scroller for every time I reload it's data...

The problem with middle screen was alayout issue... I finally solved it with the help of some colorfills that helped me to spot some wierdness...

/H

MrNorth

Posts: 60
Joined: Sat May 18, 2013 9:46 am
Location:

HTPC Specs: Show details

#3

Post by MrNorth » Thu Feb 13, 2014 7:26 pm

I solved this with a timer and a command. There is still a problem with focus animations that run when focus is shifted programmatically... but the big problem is solved... costed me wayyyyy too many hours.

/H

Post Reply