androidandroid-layoutandroid-screen-support

How get value from dimen folder in dp format


I want to programmatically set in my layout size. And this layout size get from dimen folder. but the problem is when I get the value from dimen folder, It gets displayed in a normal resolution screen perfectly but when it runs in a high display resolution it doesn't run perfectly


Solution

  • Yes I solved my screen resolution problem. When you get value from dimen folder it get in Pixel format. And Pixel size depends on your device resolution Not device size. So you need create screen size and screen resolution based dimen folder. As like: enter image description here

    In this folder categorized in different screen size and different screen resolution.