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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:58:21+00:00 2026-05-23T17:58:21+00:00

I am declaring a class that extends activity and an inner class that extends

  • 0

I am declaring a class that extends activity and an inner class that extends view and contains the onDraw() method, which also contains the invalidate() method. In my overriden onCreate() method I instantiate the outer class. My question is how the onDraw() method is called, since I never call it manually.

PS: I understand this might be a simple java language trick – I admit I am not the best here!

  • 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-23T17:58:22+00:00Added an answer on May 23, 2026 at 5:58 pm

    Whenever you call invalidate() on a view, it tells the Android OS to redraw it. Then it will call the onDraw() method. Since you put the invalidate() call inside the onDraw() method, you’re basically telling the OS to constantly redraw the view. It’s a handy way to do custom animations.

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

Sidebar

Related Questions

Is declaring a class that extends Activity inside another Activity class possible? If it
I'm declaring an NSString property in a class and objective-c is complaining that: NSString
Declaring a property in a derived class that matches the name of a property
I have a class which extends AsyncTask, which is intended to serve as a
I'm declaring a simple database class that includes an array of prepared statement, but
In code snippet below, declaring the doThings() method as static would make the class
Say I am declaring a class C and a few of the declarations are
Why wouldn't I choose abstract? What are the limitations to declaring a class member
I find myself declaring bunch of class variables and it is really tiring to
In C++ you can disable a function in parent's class by declaring it as

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.