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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:40:01+00:00 2026-05-25T09:40:01+00:00

I search a lot on this , but did not find anything that support

  • 0

I search a lot on this , but did not find anything that support my cause, I have view1 that is chess board.I draw view1 using canvas.Now i have another view2(element of chess rook,bishop) to be drawn on the chess board. So guide me

 1).Is  it possible?
 2)If not then what is alternative? ,i donot want to use layout
  • 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-25T09:40:01+00:00Added an answer on May 25, 2026 at 9:40 am

    Yes it is possible. You would have to already have the rooks, etc as drawables in your res/drawable folder, then record an X and Y coordinate in an ArrayList for the middle of each square, then draw the rooks, knights, etc at the same x and y coordinate.

    Every time a piece moves, you will need to re-draw view1 and view 2 based on whatever x,y coordinate the player moved the piece to.

    go here: http://developer.android.com/reference/android/graphics/Canvas.html

    You could maybe use that for drawRect in order to draw the squares on the board, and you would use drawBitmap to draw the rooks and the knights, etc.

    But how to draw a view2 on view1 both by canvas

    You really don’t actually need view2. Just use one view and draw the chessboard, then on the same bitmap, draw each chess piece.

    But to move player on same canvas will became so hectic if do not
    create another canvas.Tell me please it possible to draw two canvas on each other

    You could have more than one canvas, assuming you have more than one View. So I suppose you could make view1 draw the board, then view2 would be the pieces, but that’s really not necessary. Say you have pawn1 that is at x1,y1, and user2 moves to x2,y2, then draw a new rectangle at x1, y1 (black or white depending on where it is on the board), then re-draw the piece at x2,y2.

    And you could do that on View2, but I’m not 100% sure how you would implement a second view. I guess you’d have to re-draw every piece for every move onto a new bitmap instead of recycling an old bitmap.

    It would be much easier to re-draw the square then re-draw the piece at x2, y2.

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

Sidebar

Related Questions

Did a quick search but could not find anything about this. I guess all
I did a lot search already but couldn't find a straight anwser. I have
I have search a lot ,i did found many answers, but not the specific
I performed a lot of search around this question, and do not find any
Im having difficulties creating a query. I have googled a lot but did not
i have recently come to this error , i search a lot but i
I know that a lot of people meet this error. I did do search
I did a lot of search for my problem but I did not get
There's a lot of software that will take a search string and find all
I have a typical problem with SVN. I did a search in this repository

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.