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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:04:42+00:00 2026-05-16T10:04:42+00:00

I wrote the same program two ways. One using a Surfaceview, and the other

  • 0

I wrote the same program two ways.

One using a Surfaceview, and the other using a custom view. According to the android SDK development guide, using a surface view is better because you can spawn a separate thread to handle graphics. Th SDK development guide claims that using a custom view with invalidate calls is only good for slower animations, less intense graphics.

However, in my simple app, I can clearly see that using a custom view with calls to invalidate seems to render faster.

What do you guys know/think about this?

My touchEvent code is exactly the same, and my drawing code is exactly the same. The only difference is that one is all in the UI thread, and the other is using a tread to handle the drawing.

  • 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-16T10:04:43+00:00Added an answer on May 16, 2026 at 10:04 am

    SurfaceView enables to work on 2 buffer for drawing, how about your custom view?

    Another thing: You mentioned that the doc says invalidate works fast on slower animations/less intense graphics. How intense is your “simple app”? You should try to do a stress test and also take in account, how the single thread handles your touch-input.

    I have 3 threads in my game. One for game logic, one for drawing and then the “normal” UI thread…

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

Sidebar

Related Questions

I wrote two code both are same Using NSURLConnection and Using AFNetworking. My NSURLConnection
I recently wrote some code that uses the same unsigned short to store two
I wrote a program using Scala's remote actors. My first step was to create
i wonder why is this happening all the time...!! I wrote two programs one
Two types of problems I want to talk about: Say you wrote a program
I wrote two simple programs that store the same integer value to two different
i have two programs working on the same file i want the first program
I'm trying to write a java program to connect to the same MySQL database
I wrote a same(..similar?) piece of code for Java 7 and C#(.net 3.5) and
I wrote the following loop since I have to repeat the same/similar code 25

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.