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 577241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:07:57+00:00 2026-05-13T14:07:57+00:00

For Android, I have a custom view which I fill up with primitive shapes

  • 0

For Android, I have a custom view which I fill up with primitive shapes in the onDraw() method.

Coming from a Processing background, I expected the draw method to be called automatically 30 times per second, but its clear that that’s not how android views work.

So how should I go about calling this method 30 times per second?

  • 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-13T14:07:57+00:00Added an answer on May 13, 2026 at 2:07 pm

    Use an Animation, and call startAnimation() on it from your View.

    I don’t know that you can set a target framerate — rather, you’re expected to set start and end points in time, and be able to interpolate for any point in time between the two.

    If you don’t like this approach, you might consider having another thread which periodically calls view.postInvalidate() to request that your View be redrawn.

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

Sidebar

Related Questions

I have a custom Android view which overrides onTouchEvent(MotionEvent) to handle horizontal scrolling of
I have implemented a custom list view which looks like the twitter timeline. adapter
I have a GridView in which each row has a custom view. The grid
I have a FrameLayout in which I have 2 controls: - a custom view
I have a custom view (which extends GLSurfaceView) I'm trying to use in my
I have two threads in an Android application, one is the view thread, and
I have created a custom view by extending Relative Layout and it looks like
I have a custom class that I've written that extends ImageView (for Android Java).
I have a view that has a custom ArrayAdapter as a ListAdapter. Customer is
I have a little problem with an android custom dialog. I construct a custom

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.