You discovered an interesting issue. I just checked in a fix - however, it 
looks like you are using Pivot 1.5 and the fix was made for 2.0. If you want to 
manually patch the source for 1.5.2, here is the diff:

http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraAccordionSkin.java?view=diff&r1=1050963&r2=1050964&pathrev=1050964

G

On Dec 18, 2010, at 10:10 AM, Eugene Kondrashev wrote:

> Please see in attachment the demo.
> 
> 2010/12/18 Greg Brown <[email protected]>
> Any chance you could provide a simple app that demonstrates the issue?
> 
> On Dec 17, 2010, at 1:10 PM, Eugene Kondrashev wrote:
> 
> > Hi
> >
> > I faced with issue while refreshing my accordion view.
> >
> > Let say I have one accordion and one button refreshing accordions data and 
> > setting index.
> >
> >
> >         nextCompanyButton.getButtonPressListeners().add(new 
> > ButtonPressListener() {
> >
> >             @Override
> >             public void buttonPressed(Button button) {
> >                 companiesAccordion.getPanels().remove(0, 
> > companiesAccordion.getPanels().getLength());
> >
> >                 CompanyViewController companyView = 
> > UIComponents.companyView();
> >                 companyView.load(new BeanAdapter(new Company()));
> >                 Accordion.setLabel(companyView, "T1");
> >                 companiesAccordion.getPanels().add(companyView);
> >                 companyView = UIComponents.companyView();
> >                 companyView.load(new BeanAdapter(new Company()));
> >                 Accordion.setLabel(companyView, "T2");
> >                 companiesAccordion.getPanels().add(companyView);
> >                 companiesAccordion.setSelectedIndex(1);
> >             }
> >         });
> >
> > As you can see, i'm removing all the panels and initing them from the 
> > scrach.
> > So when i'm setting selection index to 0 it is ok no artifacts appears, but 
> > if it is 1 accrodion is flipping. I mean the accordion area is getting 
> > blank for a second or half and then is back to normal with right panel 
> > selected. Seems like that half a second perion selection transition is 
> > done. But there is no animation on screen.
> >
> > So finally, I need to refresh my accordion and set correct panel index. Can 
> > you tell me how can i do that without that flipping affect?
> > Perhaps I can turn off that selection animation while refresh or something?
> >
> > Thanks, Eugene
> 
> 
> <AccordionTest.java>

Reply via email to