Android Tutorial Android SlidingPanels - Simple way to create sliding layouts

gelay

Member
Licensed User
Longtime User
Hi Guys

I've loaded a layout with a few buttons on one of the scroll panels and unfortunately, if my finger touches the buttons first, the screen will not scroll. Is there any solution to put the main focus on the sliding function? I use this method for vertical scrolling. For the horizontal scrolling I use the Navdrawer and has no issues like this....

Thanks
Krisztian
 

Johan Schoeman

Expert
Licensed User
Longtime User

gelay

Member
Licensed User
Longtime User
Try this...

It's the same...not working.
Maybe I wasn't clear enough, I don't need swipe buttons.. My problem is this... If I try to swipe up or down simply on the empty panel everything worx like a charm, but if I place buttons on the panels like in the sample and try to swipe up or down above them the swipe isn't working. Its something like the buttons have the focus not the swipe gesture or something. The swipe is only recognized on "empty" places.
Try to swipe above the buttons and you will see it.

Thanks
Krisztian
 

RUNO

Active Member
Licensed User
Longtime User
Hi all .
I have an idea to make a book with 500 photos Can I do without effect on memory and be fast application ؟
I want use sliding panel .
Every image = 70 kb a proximity.
 

Mark Thorndyke

Member
Licensed User
Longtime User
Liking this and works well on an android wearable with images & text embedded. But is there a simplistic way to click a image/button/text under the panel and call a subroutine? (The image not full screen and hence able to keep on swiping through) or am I barking up the wrong tree with this and need to look at alternatives?
 

Mark Thorndyke

Member
Licensed User
Longtime User
I appear to be struggling getting touch events through to the internal view for some reason - doesn't want to play with me :-( Will scratch my head for a few days to why , probably overlooked something and missed the obvious.

I had a look at the TabStripViewerPager tutorial (https://www.b4x.com/android/forum/threads/tabstripviewpager-better-viewpager.63975/) which works well but don't require the menus - as it's for a wearable. If available without the tab strip, perfect.
I've since looked at @Dominex [Class] Multi Type SlidingPanels (https://www.b4x.com/android/forum/threads/class-multi-type-slidingpanels.23303/) and the classic full screen in there works with click/long click which helps a cause but code is far longer than the two above.
 
Last edited:

Mark Thorndyke

Member
Licensed User
Longtime User
Back to the TabStripViewerPager - I notice taking the Custom Views for Tab height, indicator height and underline height to 0 removes these and thus is what I am looking for. Will use that as ticks all boxes
 

anglia

Member
Licensed User
Longtime User
I've tried Erel's Slidingpanels successfully with horizontal sliding. i also tried another example that allows vertical sliding. I've been trying to combine both horizontal and vertical slidin in the same app. I've spent hours of trying various animation combinations without success. Can anyone suggest a solution or an example please?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…