• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

50 Hacks: The wizard form using a Gallery

 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
author
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can try it using another gallery, may be it should work.
 
Steve Luke
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yep, ViewPager would be an easy way of replacing it.
 
I miss the old days when I would think up a sinister scheme for world domination and you would show a little emotional support. So just look at this tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic