Android Tutorial Android SlidingPanels - Simple way to create sliding layouts

awama

Active Member
Licensed User
Array Index Out of Bounds error

I get an Array Index Out of Bounds error.

Update: No, I think it was a problem with another app with the same name. I modified the old example and broke it. I think the process was still in memory.
I also get an Array Index Out of Bounds error (line 29, slidingPanels_changepanel) whenever I resume the App AND the last state was Panel 0 ?!
 

awama

Active Member
Licensed User
Yes, I try it with the program attached to the first post?
If I start the App new after I pressed the home button on the phone while the "panel 0" is showing then I get an error..
 

buttons

Member
Licensed User
sliding panel with a list view

Hi. The sliding panels thing is great.

I have a problem, one of the layouts I am loading to one of the sliding panels comprises of a panel containing a listview. When I slide to this panel, and then onto the next, the list view is left behind, kind of like an overlay.
I removed it from the panel, and my other layouts work as expected.

Any ideas folks? Many thanks, Mark:confused:
 

NJDude

Expert
Licensed User
...When I slide to this panel, and then onto the next, the list view is left behind, kind of like an overlay.
Did you add the ListView to the Panel? maybe you added it to the Activity.
 

buttons

Member
Licensed User
The layout file has a panel, Panel1 with the ListView on it (ie. Panel1 is parent item), and Activity is parent item for Panel1.
I have declared LstStats as ListView, initialised it LstStats.Initialize("LstStats"), and when I've added some items to it, I do:
Activity.AddView(LstStats, 0, 0, 100%x, 100%y)
 

NJDude

Expert
Licensed User
Activity.AddView(LstStats, 0, 0, 100%x, 100%y)
You are adding LstStats to the ACTIVITY and not to the panel

It should be

Panel1.AddView(LstStats, 0, 0, 100%x, 100%y)
 

buttons

Member
Licensed User
Aha, of course you are right, thankyou.

I had assumed that because the layout had LstStats on Panel1 that it would find its way there!
 

skcud

Member
Hey Guys, could someone please explain why this doesn't work on my system? I know there is something I haven't done, most likely to do with the libraries, I just can't figure it out.

I get a library reference error about the term 'slidingdata'.

I've checked 'animation' in the lib section and it is version 1.02. What is it that I haven't done/have done wrong?

Thanks :)
 

pluton

Active Member
Licensed User
Hey Guys, could someone please explain why this doesn't work on my system? I know there is something I haven't done, most likely to do with the libraries, I just can't figure it out.

I get a library reference error about the term 'slidingdata'.

I've checked 'animation' in the lib section and it is version 1.02. What is it that I haven't done/have done wrong?

Thanks :)
Did you forgot in project module SlidingPanels ???

 

skcud

Member
Excellent, thank you. The app failed to load the module and I didn't even realise. Was because I also hadn't realised that I didn't unzip the package...was a long day...
Thanks for the help :)
 

Cdymock

Member
Licensed User
Sliding Panels With Scroll View Swipe Not Captured

Hi,

I am using the sliding panels code which is excellent.

I have added a scroll view to the panel, the scroll view scrolls up and down with a swipe however, I no longer get the ability to the slide the panel from left to right. I guess the scroll view is capturing and keeping the touch event is there anyway to get round this?

i have tried using Initialize2 for the scroll view and declaring an event and tried event_Touch to try and capture these but noting seems to come through.

Cheers

Chris
 
Last edited:
Top