在纵向方向机器人的风景布局

时间:2017-04-18 18:25:58

标签: android android-layout android-toolbar android-orientation

我想将横向xml显示为纵向模式。以下是样本:

enter image description here

我已经尝试制作layout-land文件夹并将xml添加到肖像活动并将其附加到肖像活动但这不起作用。

请帮我一些想法或任何事情。

2 个答案:

答案 0 :(得分:2)

您必须强制您的“活动”始终以Manifest.xml文件中的横向模式显示:

 <activity
            android:name=".ui.loading.LoadingActivity"
            android:label="@string/app_name"
            android:noHistory="true"
            android:screenOrientation="landscape">

答案 1 :(得分:1)

简单,只需添加

cumsum_bounded(a, 5)
## [1] 1 2 3 4 5 5 5
cumsum_bounded(a, 5, 2)
## [1] 2 3 4 5 5 5 5

到您的XML布局 这将有助于你只是像纵向方向显示

OR 即使你可以从Java中做到这一点:

android:rotation = "90"

您至少需要API级别11才能使用轮播

相关问题