Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COThanks. I am loading through getResources(), R.drawable and it will always be a bitmap. If this ends up in prod is yet to be determined. Depends on what I learn before then. If the framework always picks the correct density, I won't have to do as much, but I didn't want to assume it was bug free, so I wanted to verify it picked what I expected based screen dimensions. If it didn't, I'll scale it myself and set some values, so I can calculate locations of the bitmaps on the screen. There are some other reasons I want this info, but I am running out of characters that I can type in this comment.
      singulars
    2. COYou wouldn't want to scale it yourself -- the framework will automatically scale a drawable (including the dimensions reported to you) based on the density of its bitmap in relation to the device (or target Canvas) density. There are a lot of subtle things done to ensure that a drawable in a density different than the density the app is working in will behave as if it is in the app's density. This is fundamental to things like the density compatibility code that ensures applications written before 1.6 still work on device with different density screens.
      singulars
    3. COOne of the reasons I thought about doing this is when I had a background bitmap that was 480 x 800 and I tested it on a 480 x 854 display, there was a gap at the bottom. In other words, it didn't scale it automatically to that screen. As soon, as I put code in to scale it myself, it looked fine. Are you saying it was supposed to scale automatically to the 480 x 854 screen?
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload