java - Supporting multiple screens in android in single layout -
i have followed following link application can support different screen sizes:
supporting multiple screens in android
that solution works perfectly. concern here is, when have android application having 8-9 screens, means have 8-9 different .xml layout files. support screens folder bifurcation , means have manage above fifty xml files layouts , simple change in ui, have go folders , implement change in xml file. can there better way , mean such layout can resize controls or that?
i think not complex. create layouts in layout folder. use styles.xml, dimens.xml , strings.xml
save font size , strings. when layout finalize i.e no changes required, copy these layouts layout folder , paste in layout-small, layout-large, layout-xlarge
. when need change strings, style , font size have make changes in values folders.
for example-
instead of android:text="hello"
use android:text="string/hello"
, save value of hello in strings.xml. text size android:textsize="@dimen/btxt"
.
this 1 of best alternative.
Comments
Post a Comment