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

  • SEARCH
  • Home
  • 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 6637447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:18:59+00:00 2026-05-25T23:18:59+00:00

This is mostly a philosophy question, as the actual problem is solved. The SDK

  • 0

This is mostly a philosophy question, as the actual problem is solved. The SDK provides a Gallery class. This Gallery is 90% of what I need, it’s just missing 2 things. One I want to implement an extra Runnable that triggers periodic advances to the next item, and two I need it to animate the scroll between items.

The auto periodic advance was easy. However I came across major issues implementing the scoll animation between items. Now I’ve solved this by override setSelection to essential be a wrapper to onFling.

My background is primarily Python at this point, so this implementation feels kinda dirty to me. I’m calculating a velocity based on the parents width and then calling onFling(null, null, my_calculated_velocity, 0). This feels really wrong to me, what if for some reason the way google calculates distance from velocity changes?

Now I look through the source of Gallery, and I see tons of ways that feel a ton better to me:
moveNext
scrollToChild
mFlingRunnable.startUsingDistance

None of which are accessible from a subclass of Gallery. In Python there is no real concept of private, so I find it frustrating to no end that when I subclass something in java I end up having to copy paste 2/3’s of the class just to override a single behavior.

So the question is am I doing something wrong that’s leading me to attempt to do things in ways that are against the Java grain or can I just expect to be frustrated everytime I sit down to work on an android project and find all the methods that do what I need to be be private or default, rather than public or protected?

  • 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-25T23:19:00+00:00Added an answer on May 25, 2026 at 11:19 pm

    Gallery is as previously mentioned not a very nice class to extend. A better way here would actually be just getting the source and using that.

    FYI the velocity DO change, if the device for some reason locks up momentarily.

    You are not doing something wrong, it’s the class that is designed wrong/for something else.

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

Sidebar

Related Questions

This is mostly a data warehouse philosophy question. My project involves an Oracle forms
This is mostly a theoretical question I'm just very curious about. (I'm not trying
This is mostly just out of curiosity, and is potentially a silly question. :)
I think this mostly applies to web applications, since you often see things like
This question is mostly academic. I ask out of curiosity, not because this poses
This is mostly for educational purposes. I'm trying to create the InputMapper class, which
I'm starting on a new iPhone project, and this application mostly relies on MySQL.
I am mostly following this page: http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html I used this command to create the
I have this thing working mostly. What I don't get is, if I have
This is the situation : I mostly program C# and have written types in

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.