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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:56:05+00:00 2026-06-13T22:56:05+00:00

I actually work on an Game and need some backup because Canvas. I draw

  • 0

I actually work on an Game and need some backup because Canvas.

I draw a background with canvas. So i made Picture exactly for the resolution of the screen we work on. On the device the picture is to small and dont fitt to the screen. Did i miss something that the draw makes it smaller?

Here is some code

public class Map extends View{
int[][] mapArray = new int[32][18];
private Bitmap picture;
private Paint paint;

public Map(Context context){
    //basic init map
    super(context);

    this.setPicture(BitmapFactory.decodeResource(context.getResources(), R.drawable.newmap2));
}


public Bitmap getPicture() {
    return picture;
}

public void setPicture(Bitmap background) {
    this.picture = background;
}

@Override
protected void onDraw(Canvas canvas) {
    canvas.drawBitmap(picture, 0, 0, paint);
}

Hope you can help me out
Best regards
Ben

  • 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-13T22:56:06+00:00Added an answer on June 13, 2026 at 10:56 pm

    Maybe you put the bitmap in a high dpi directory (e.g. res/drawable-xhdpi) and your device is of a lower dpi ? In this case the image is scaled down on open.
    What you are doing is not safe, other devices will have other screen sizes.

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

Sidebar

Related Questions

Actually We are doing thesis work where we need to make 10 voip phones
I have a windows service that does some intensive work every one minute (actually
I made a HTML5 game for web browsers. Some of the players asked me
Does anyone know how DbDataReaders actually work. We can use SqlDataReader as an example.
so it would appear that the only values that actually work are 0.0, 0.5,
Is there any way I could run the following 'logical code' to actually work?
Like many variables in PHP using ini_set() on a page doesn't actually work. I've
How does read(buffer, offset, length) actually work, if i pass the length to read
Problem This question actually came up at work today. We are planning an experiment
Just curious. How does actually the function Sleep() work (declared in windows.h)? Maybe not

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.