-1

I want to make a background for a View (LinearLayout specifically) and I want it to look good on every screen so I would like to make separate .png background files for every screen density and put them in their "drawable" folders.

But how to measure view's size on every screen to make proper background files? Is it a good way to take view's size in dp on one screen and then calculate its size in pixels on every density according to this dp value?

My LinearLayout for which I want to make background is made of a few TextViews groupped vertically. Lets say that text size will be in dp, not sp. Will this view have the same size measured in dp on every screen configuration?

Android developer
  • 1,272
  • 1
  • 12
  • 17

1 Answers1

0

cut your background .png images according to your need that will be better for you. if you set the size of them the image gets blur.

Chaudhary Amar
  • 836
  • 8
  • 20