0

I have created a drawable folder for 540 * 960 size as name like drawable-sw540 and also created layout-sw540,but running in emulator resolution of 540 * 960.It doesn't effect and view the actual drawable and getting from default drawable and layout.
If anyone have idea about this please reply.

Renjith
  • 5,783
  • 9
  • 31
  • 42
jagdishkumawat
  • 301
  • 3
  • 12

2 Answers2

1

The Resolution is specified in pixels i.e. 540 * 960 pixels.
But in Android, resource folders are specified in Density-independent Pixels(dp) not pixels(px). So drawable-sw540 may not be the correct folder.
See this for more info

First calculate the dp of your device and then name layouts and drawables according to that.

Community
  • 1
  • 1
Renjith
  • 5,783
  • 9
  • 31
  • 42
0

I solved this problem by trying following steps:- 1. add new xml layout and set custom configuration like dimension,density etc.So create a new drawable folder of the defined configuration,then i put all the drawable images to that folder. 2.Created custom AVD of the required configuration(540*960) and run application in emulator. so finally it works fine.........

jagdishkumawat
  • 301
  • 3
  • 12