title: Android text size programmatically depends on resolution or density
body: <p>I have a problem with text size in 5.7" phone or 1440 x 2560 pixel phone
  I tried 2 phone, one is LG V10 and another is Samsung Galaxy Note 5. This 2 phone is same in resolution and screen size but the result of text size is different. In Samsung galaxy note 5 the text size is looks good but in LG V10 is terrible</p>
  
  <p>I use this code to calculate text size in different screen size</p>
  
  <pre><code>Point size = new Point();
  getWindowManager().getDefaultDisplay().getSize(size); 
  float percent = .18f;
  textView.setTextSize(percent * size.x);
  </code></pre>
  
  <p>Please help me what is the best way to calculate text size in different resolution</p>