Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 623629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:06:48+00:00 2026-05-13T19:06:48+00:00

I’m looking for a widget that behaves similar to the gallery widget but scrolls

  • 0

I’m looking for a widget that behaves similar to the gallery widget but scrolls vertically instead of horizontally. I googled all around and apparently the answer is no such pre-made widget exists.

So I said myself, oh well, I’ll look at the gallery class in the android source and modify that to scroll vertically instead. Not so easy. The android SDK hides a lots away (understandably for framework maintenance), but it also makes it very hard to extend the widgets. The gallery class, for example, use a lots of member variable from its parent, AbsSpinner (mSelectedPosition, etc.etc.), and its parent’s parent, etc… which are not at all accessible from the app-developer’s standpoint. Without access to those member variable, I cannot use similar code from gallery class for my own use.

Short of moving up the inheritance chain and put the source code of those parent classes all in my project, or writing the widget all from scratch without using the existing framework widgets that already solved the problem, I can’t find a way to get a vertical scrolling gallery.

Is there a better way around? Why does the android framework make extending widget so difficult?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T19:06:49+00:00Added an answer on May 13, 2026 at 7:06 pm

    Is there a better way around?

    Since we don’t know what you are building, that’s impossible to say. I agree with Yoni Samlan’s comment that a ListView may be sufficient for your needs.

    Why does the android framework make
    extending widget so difficult?

    While it is conceivable that a reimplemented Gallery might make it simpler for you to make it orient differently, the core Android team has to weigh such reimplementation against other development priorities.

    One of those priorities is SDK fidelity. They want to make sure that, to the greatest extent possible, code written for Android 1.5 can run on Android 2.1 without modification. This limits them in two ways. First, they cannot just change the existing Gallery, for example, to accommodate your desires, if doing so causes them to break their existing API. Second, the core Android team will not expose new methods or classes, even if those might be beneficial to third-party developers, unless and until the team is ready to support those methods or classes for the long haul.

    Android was initially written before an SDK existed. That’s the reason given for why most of the built-in applications (e.g., calculator) cannot be built with the SDK alone, but needs to be built as part of a firmware image. Similarly, the core Android team had to make a decision, as part of creating the initial SDK, of how best to take the existing code and create public stuff we can work with and protected/private stuff we cannot, with SDK fidelity in mind. As you may have noticed, Android is vast, and so creating the SDK must have taken a correspondingly vast amount of staff time. Rewriting lots of it to increase the odds that somebody could, say, create a vertical Gallery wasn’t probably high on their list.

    In an ideal world, yes, we would be able to more readily extend built-in widgets and significantly modify their behavior. Similarly, in an ideal world, I would have hair… 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I've got a string that has curly quotes in it. I'd like to replace
I am doing a simple coin flipping experiment for class that involves flipping a
I need to clean up various Word 'smart' characters in user input, including but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.