【问题标题】:android - how can i use the “android:layoutDirection”? - againandroid - 我如何使用“android:layoutDirection”? - 再次
【发布时间】:2012-05-22 17:54:15
【问题描述】:

谁能帮助我如何使用这个属性android:layoutDirection

请不要向我推荐这个问题What is the status of Right To Left languages on Android?,因为它没有回答我的问题!

【问题讨论】:

  • 您不需要重新发布您已经提出的确切问题:stackoverflow.com/questions/10634414/… 我建议您在发布更多问题之前阅读 Android SDK 文档。
  • 感谢您的重播,但我能做什么没有人回答我的问题!所以我决定重新发布它。我会阅读文档,如果有解决方案,我会发布它。再次感谢。
  • 你应该用你找到的任何东西或更多数据来冲击另一个帖子。

标签: android android-layout android-linearlayout


【解决方案1】:

layoutDirection 4.0 没有发布,所以你不能使用 attr,但是如果你不使用 sdk,而是使用 android 的所有代码构建。 首先在创建时在代码中获取 Linearlayout,通常在 setContent 之后,并使用在 View.java 中定义的 @hide api setLayoutDiredtion(View.LAYOUT_DIRECTION_LOCALE) ,当然4.2以后就可以直接在xml中使用layoutDirection了

【讨论】:

    猜你喜欢
    • 2019-02-20
    • 2015-09-09
    • 2018-12-02
    • 1970-01-01
    • 2012-03-27
    • 1970-01-01
    • 2021-08-24
    • 2015-10-17
    • 1970-01-01
    相关资源
    最近更新 更多