嗨,我是安卓世界的新手。我正在开发一个支持阿拉伯语和英语的应用程序。因此,我在 xml 中针对英语进行了设计,并通过代码,当用户想要使用阿拉伯语时,我更改了小部件的重力以匹配阿拉伯语的右侧向左看。
现在,如果用户将语言从英语更改为阿拉伯语,并且出于某种原因他想再次恢复英语。如何再次恢复 xml 中的布局?
提前致谢 :)
Hi I'm new to android world. I'm working on an application that supports arabic and english languages.So I made my design for english language in the xml and through the code when the user wants to work with arabic language I change the gravity of my widgets to match the arabic right-to-left look.
Now if the user changes the language from english to arabic and for some reason he wanted to get back to english again.How can I restore the layout in the xml again?
Thanks in advance :)
发布评论
评论(1)
创建两个布局并按正确的顺序切换它们会让您更加轻松。
It will be more comfortable for you to create two layouts and switch them in right order.