aspose file tools*
The moose likes Android and the fly likes 50 Hacks: The wizard form using a Gallery Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "50 Hacks: The wizard form using a Gallery" Watch "50 Hacks: The wizard form using a Gallery" New topic
Author

50 Hacks: The wizard form using a Gallery

Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 3948
    
  17

I was peaking at the table of contents for the 50 Android Hacks book being featured this week. One that caught my attention was #17 'Creating a wizard form using a Gallery.' The reason that is of interest is that the Gallery is now deprecated. Google offers two options for replacement, the HorizontalScrollView, and the ViewPager, but neither really supports everything the Gallery can do. The main issue with the ViewPager is that it does not allow flings for fast scrolling, and the main problem with HorizontalScrollView is that it does not center-lock.

So for the wizard form, have you looked into the alternatives to see which might be a good replacement? Would you suggest continuing to use the deprecated Gallery (it has flaws, but maybe those aren't so important in a wizard form) or use a ViewPage (not likely to need flings in a wizard. Though wish it could handle view recycling for me)? I assume the HorizontalScrollView is not a good replacement since it does not center-lock which would be a necessity.


Steve
Carlos Sessa
author
Greenhorn

Joined: Apr 17, 2013
Posts: 14
Steve Luke wrote:I was peaking at the table of contents for the 50 Android Hacks book being featured this week. One that caught my attention was #17 'Creating a wizard form using a Gallery.' The reason that is of interest is that the Gallery is now deprecated. Google offers two options for replacement, the HorizontalScrollView, and the ViewPager, but neither really supports everything the Gallery can do. The main issue with the ViewPager is that it does not allow flings for fast scrolling, and the main problem with HorizontalScrollView is that it does not center-lock.

So for the wizard form, have you looked into the alternatives to see which might be a good replacement? Would you suggest continuing to use the deprecated Gallery (it has flaws, but maybe those aren't so important in a wizard form) or use a ViewPage (not likely to need flings in a wizard. Though wish it could handle view recycling for me)? I assume the HorizontalScrollView is not a good replacement since it does not center-lock which would be a necessity.


Steve:

You are right, the Gallery widget is deprecated.
When I wrote it the ViewPager wasn't available

I ended up leaving it because it shows different tricks to tweak a view component.
Anna Harris
Greenhorn

Joined: Aug 21, 2012
Posts: 13
You can try it using another gallery, may be it should work.
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 3948
    
  17

Yeah, The gallery will still work even though it was depicted, it still Is live in the SDK. I was just wondering if Carlos had an idea for the replacement since it is not the best idea to keep using depicted code.

This isn't meant to be criticism, I totally understand that these books take time to write and Gallery was just recently deprecated. It sounds like the ViewPager would make for a good stand-in though.
Carlos Sessa
author
Greenhorn

Joined: Apr 17, 2013
Posts: 14
Yep, ViewPager would be an easy way of replacing it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 50 Hacks: The wizard form using a Gallery
 
Similar Threads
show() and setVisible(boolean)
Certified Developer (96%) with Oracle skills and a degree ... not even entry level ?
@deprecated
Ubuntu Hacks by Jonathan Oxer, Kyle Rankin, Bill Childers
JVM customization for faster Array Access