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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T21:54:02+00:00 2026-06-02T21:54:02+00:00

I just have a quick question about how you would typically approach this. I

  • 0

I just have a quick question about how you would typically approach this. I am not sure if you have seen the game Paper Toss or anything similar where you place your finger over an existing image drag it for bit (lets say by pulling the imageview) and let go which makes this image move across the screen.

To do something like that, what would be the best way to handle such graphics (mainly concerned about graphics motion and touch event):
-Have an imageview and OnTouchListener that will get the x/y and do a translateAnimation to every X/Y and then do translateAnimation of the image across the screen when the touch is lifted

-OR have surface view and draw an bitmap of the image on Canvas and have the OnDraw method getting the X/Y coordinates of the touch event and draw bitmaps accordingly

I am always confused which one to go with and why? (I am aiming for Android 2.3 so drag/drop is something out of scope for this)

PS: I assume that Canvas and surfaceview comes always together so correct me if I am wrong

  • 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-06-02T21:54:03+00:00Added an answer on June 2, 2026 at 9:54 pm

    PS: I assume that Canvas and surfaceview comes always together so correct me if I am wrong

    Yes you are correct they both come together.

    First in animation(Either Translate,Rotate,Scale) we just change the position, view of ImageView for a specific time(meanwhile it show effect of animation). then it will come in its original position.

    But in canvas, We change the ImageView( we draw Bitmap here not image view)permanently on base of it coordinate. Suppose you want to change you Image where ever your finger touch then simple draw it with new coordinate that you got from OnTouchEvent()

    Finally i will say that nothing is best it based on our requirement. Surface and canvas used mainly in Gaming context.

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

Sidebar

Related Questions

I just have a quick question about how to get the length of a
This is just a quick question in C#. I have a scenario where I
I just have a quick question about how to generate id's on-the-fly for HTML
I have a quick question about a preg_replace problem I have. I am just
i have a quick question about objectify - this may be in the actual
Just have a quick question... any help would be greatly appreciate! I'm writing a
Folks, I just have a quick question about updating my app after it is
A quick question about best practice with PHP classes. I have seen people use
Just a quick question, I have a figure which contain an image and a
Just a quick question here. I have a program in which I need to

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.