Java Question AHViewPager.library Beta - Sliding panels now almost perfect

corwin42

Expert
Licensed User
Longtime User
Added a new version (0.2 beta) which adds a tab indicator like in Android Market.

Currently the PageChanged event does not work because the tab indicator sets its own onPageChangeListener. I tried to put the ba.raiseEvent() into it but it seems that ba.subExists() does not find the event sub now and so it does not work. I need to have a look into this later.
 

Smee

Well-Known Member
Licensed User
Longtime User
Looks Very good .

I will watch this with great interest
 

COBRASoft

Active Member
Licensed User
Longtime User
Works great already!

The ability to have vertical and horizontal scrolling combined is really nice. The paging a the top could use some more UI love . Perhaps you can show the whole name and not half of it at the sides. This would make the clicking a bit easier.
 

corwin42

Expert
Licensed User
Longtime User
The paging a the top could use some more UI love . Perhaps you can show the whole name and not half of it at the sides. This would make the clicking a bit easier.

The next version will have many possibilities to customize the pager so it will be possible to make a dark or light theme.
 

Smee

Well-Known Member
Licensed User
Longtime User

I am still trying to understand how the paging works. There is not a lot of code to follow but it works and i cannot see how so as to make changes
:sign0188:
 
Last edited:

COBRASoft

Active Member
Licensed User
Longtime User
The base comes from the panel array, the rest is UI setup. All the magic happens in the libraries.
 

Smee

Well-Known Member
Licensed User
Longtime User

Have been playing around with this. Cant wait until its finished esp the PageChanged event
 

corwin42

Expert
Licensed User
Longtime User
Updated the library and example in the first post. Now it is possible to dynamically add and remove pages.

Library is now almost complete. Need to write some documentation and implement some features into the example.

I don't know if its currently possible to save the state of the container object to restore it after rotation.
 

COBRASoft

Active Member
Licensed User
Longtime User
Hey,

This is becoming really nice! Congrats! Missing the vertical list in the sample though to show the real power of this library.

Is it possible to add a property to enable/disable user sliding? Perhaps 2 properties 'AllowUserSlideLeft' and 'AllowUserSlideRight'. This would make it possible for a user to go only back, forward or nowhere by sliding.

Greetings,
Sigurd
 

Smee

Well-Known Member
Licensed User
Longtime User
gunna try this again when i get home from work
 

corwin42

Expert
Licensed User
Longtime User
Is it possible to add a property to enable/disable user sliding? Perhaps 2 properties 'AllowUserSlideLeft' and 'AllowUserSlideRight'. This would make it possible for a user to go only back, forward or nowhere by sliding.

No, I think it's not possible without changing the code of the standard ViewPager class which is provided by google (though the source is available for it). You can remove the pages from the container if you don't want to scroll to them.

The ListView (and some more GUI elements) will be back in the example in the final version.
 

corwin42

Expert
Licensed User
Longtime User
Wizards will be possible with this library. Just start with only the first page. If the user filled in every required value add the second page. When he swipes over you can delete the first page etc.
But I don't think that this has a big advantage over implementing a wizard with multiple activities.
 

COBRASoft

Active Member
Licensed User
Longtime User
The visual part of 'sliding' is interesting for the user. It feels natural and the user is already used to the sliding to go to the next or previous step. being able to 'block' the sliding in 1 direction (or both) could indicate a required value must be entered before the slide.

So, if there would be an event like 'beforeslideleft' (and right) with a cancel possibility, this would be awesome!
 

booster55

New Member
Licensed User
Longtime User
Corvin, could you maybe provide a short code sample for a wizard-like structure (i.e. without allowing the user to swipe backwards and without allowing him to swipe forward without having filled in all required fields). I'm trying to accomplish this with your library (which is really cool btw.) and I'm really having a hard time.

And another, yet related question: What does the "Enabled" member of the pager actually do? I assumed it would switch of the pagers functionality which would make creating wizards much easier. However, it doesn't seem to do anything (or maybe I'm just too stupid).
 

corwin42

Expert
Licensed User
Longtime User
This is an outdated thread. Please use the thread linked in first post for questions.

I have answered in the thread linked in first post.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…