right to left - How do I have Android use a qualified resource file only on older devices? -
i have separate layout file arabic users, want use devices don't support android's native rtl mirroring (introduced in api level 17). if using device api 17 or above, want default xml file used.
how accomplish this? know:
if put home.xml
in res/layout/
used default layout file.
if put home.xml
in res/layout-ar/
used arabic speakers
if put home.xml
in res/layout-ar-v17/
used arabic speakers v17 or higher.*
*the problem is, don't want have home.xml, want system use default , mirror it.
you use layout aliases. end 2 layout files, let's call them home_one.xml , home_two.xml. in res/values/layout.xml
, res/values-ar-v17/layout.xml
have
<item name="home" type="layout">@layout/home_one</item>
and in res/values-ar/layout.xml
need
<item name="home" type="layout">@layout/home_two</item>
Comments
Post a Comment