Edited Question:
Mobile Resolution:
I would like to design different screen dpi like following resolutions.
320x480,
48
I have created a function which convert size of dp to the size according to screen size and it is working well for me. Any one having problem with text size according to screen should give this a try.
public float convertFromDp(int input) {
final float scale = getResources().getDisplayMetrics().density;
return ((input - 0.5f) / scale);
}
simple give the value given by it to the text view size programically as below
tvTextView1.setTextSize(convertFromDp(24));