Friday, 3 May 2013

Font compatibility for android devices and tablets

Create Following all folders in Res folder of your Project.


       values-ldpi
       values-mdpi
       values-hdpi
       values-large-mdpi (This is for 7" tablets)
       values-xlarge (This is for 10" tablets)

       Now create xml file in each folder abs__dimens.xml and Give different text size in  <dimen></dimen>

       <?xml version="1.0" encoding="utf-8"?>
       <resources>
              <dimen name="txt_nm">10dip</dimen>
       </resources> 

       Now set this in to text view property-text size
       android:textSize="@dimen/txt_nm" />

       It will work fine for all Android devices and Tablets, Hop It will help you some one !