问题描述
我不能找到一种方法来设置的方向上我SlidingDrawer当我从横向模式改为纵向模式,反之亦然。
I cant find a way to set the orientation on my SlidingDrawer when i change from landscape mode to portrait mode visa versa.
起初,我设定取向XML垂直。我需要改变方向为水平当手机在横向模式,所以我得到左边的把手。
Initially i set the orientation by xml to vertical. I need to change the orientation to horizontal when the phone is in landscape mode, so i get the handle on the left.
任何想法,任何人?
推荐答案
我不相信这是可能与标准 SlidingDrawer
。您可以实现自己的抽屉里(也许是的一个子类 SlidingDrawer
)实现此功能。
I do not believe that is possible with the standard SlidingDrawer
. You may be able to implement your own drawer (perhaps a subclass of SlidingDrawer
) that implements this functionality.
SlidingDrawer
似乎是有限的,在很大程度上,什么是需要在标准Android主屏幕上的应用程序抽屉。那个抽屉始终保持固定在屏幕的同一个物理一侧(底部,如果照吧,如果横向)。
SlidingDrawer
appears to be limited, in large part, to what is needed for the application drawer in the standard Android home screen. That drawer always stays anchored to the same physical side of the screen (bottom if portrait, right if landscape).
这篇关于如何通过code来改变的Android SlidingDrawer的方向?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!