机器人 - 我该如何使用“安卓的layoutDirection”? - 再次 [英] android - how can i use the “android:layoutDirection”? - again

查看:763
本文介绍了机器人 - 我该如何使用“安卓的layoutDirection”? - 再次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮助我,我怎么可以使用这个属性安卓的layoutDirection

can someone help me how can i use this attribute android:layoutDirection ,

请不要参考我对这个问题的 Android的 - 什么是正确的状态到左的语言在Android 因为它没有回答我的问题!

and please don't refer me to this question android - what is the status of Right To Left languages support on android because it doesn't answer my question!

推荐答案

的layoutDirection是不会被发表在4.0,所以你不能使用ATTR,但如果你不使用的SDK,但建立与Android的所有code 。
首先得到的LinearLayout在code将其创建时,setContent正常后,用@hide API setLayoutDiredtion(View.LAYOUT_DIRECTION_LOCALE),它定义View.java
当然,4.2之后就可以在XML中使用的layoutDirection直接

layoutDirection is not be published in 4.0,so you cannot use the attr,but if you not be using sdk,but build with all code of android. first get the Linearlayout in your code when it created,normally after setContent,and using @hide api setLayoutDiredtion(View.LAYOUT_DIRECTION_LOCALE),which define in View.java ,of course,after 4.2 you can use layoutDirection in xml directly

这篇关于机器人 - 我该如何使用“安卓的layoutDirection”? - 再次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆