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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T11:27:49+00:00 2026-05-18T11:27:49+00:00

Say I’d like to make a memory/pairs game. I have currently made a draft

  • 0

Say I’d like to make a memory/pairs game. I have currently made a draft that works on a Canvas, and cards are drawn into a grid.

This works for my current basic version, but I’d like show do an animation (when the card is turned, it will flip around and scale to higher size; or when the match is found, the cards would rotate around and then go back.
I can’t imagine doing this on Canvas, I’d have to make a lot of timers and do the animation by hand, it seems overly complex for this simple task.

I think I could could subclass View for a control that would display a card, and then react to touch events for that control. It would also make drawing scaling of the images done by Android itself, and, most importantly, I could use Tween Animation for some effects.

My question is – would it be OK to use a View for each card in the game (I could have 5×6 or 4×5 cards), and arrange them in a GridView? Are there some pitfalls with this approach? Or should I continue with completely custom-drawn Canvas?

  • 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-18T11:27:49+00:00Added an answer on May 18, 2026 at 11:27 am

    For such a simple game you should be fine using a collection of Views. As you mention using Views rather than trying to do it manually you get access to a lot of nice Animation functionality for free.

    It also makes implement the user interface a lot simpler as you can just add onClickListeners to each view to capture user touches. If you’re drawing it all manually to a Canvas then you’d have to interpret the touches yourself and decide which card was touched etc. While this isn’t too hard, then I think subclassing View is a better model and will most likely result in cleaner code.

    As you are only going to have 30 cards, then I can’t imagine you having performance issues either – if you were thinking 100+, then maybe you’d have an issue, but I think you’re fine. Also, if I understand your game correctly, the majority of your cards won’t be animating most of the time so that’s yet another reason not to worry – if you ever run into performance issues with the animations you can easily save off all the unanimated Views onto a Bitmap (Canvas) for the duration of the animation.

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

Sidebar

Related Questions

Say I have a class named Frog, it looks like: public class Frog {
Say I have a class Code defined like this, with a user specified type
Say I have a method like this: public void SaveData() { try { foreach
Say I have a method declaration like: private void someMethod(final String someKey, final Object
Say I have an array of string s like this: string [] foos =
Say i have a tab control that displays data of various types, eg EditorTabViewModel
Say we have the following simple data-frame of date-value pairs, where some dates are
Say I have a class with synchronized methods. It's actually a class that uses
Say if i have a master page in that i have a button if
Say that you have a XHTML document in English but it has accented characters

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.