I had developed an android app with RealtiveLayout
but when I run on small screen devices the fields are overlapping.
How can I get the width and height of the device programatically so that it is easier for to adjust the screen size
I had developed an android app with RealtiveLayout
but when I run on small screen devices the fields are overlapping.
How can I get the width and height of the device programatically so that it is easier for to adjust the screen size
Use Horizontall ScrollView for that then it looks perfect on small devices also.
<compatible-screens>
<!-- all small size screens -->
<screen android:screenSize="small" android:screenDensity="ldpi" />
<screen android:screenSize="large" android:screenDensity="mdpi" />
<screen android:screenSize="normal" android:screenDensity="hdpi" />
<screen android:screenSize="xlarge" android:screenDensity="xhdpi" />
<!-- support for Xperia Z, Galaxy S4 and HTC One -->
<screen android:screenDensity="480" android:screenSize="normal" />
<screen android:screenDensity="480" android:screenSize="large" />
</compatible-screens>
Try this code in the manifest I think this will work.. Other wise Create separate folders in res folder like layout-small, layout-large, layout-normal, and use appropriate images in the drawable folder drawable-hdpi, drawable-ldpi, drawable-mdpi... I am sure this will help you for various screen orientation..