i create an android application to support both mobile android phone and galaxy tab, i need to align the text dynamically , it is mobile version (layout-small) i need to set the text for Text view dynamically as ” mobile phone ” , else if it is samsung galaxy tab or some other android tab , i need to dynamically set the text as ” Galaxy Tab”.
If any one know the solution help me out?
Thanks.
You can use this function to dynamically determine the width of the device:
if the width>480 than it must be tab otherwise the device is android phone.
Using this you can set the text dynamically according to the screenWidth.