2014-12-25 7 views
-3

안드로이드 응용 프로그램에서 세로 모드로 자동 회전을 프로그래밍 방식으로 비활성화하려면 어떻게합니까?프로그래밍 방식으로 자동 회전 사용 안 함

이 코드에서 어떻게 비활성화 할 수 있습니까?

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:tools="http://schemas.android.com/tools" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:background="@drawable/back" 
android:paddingBottom="@dimen/activity_vertical_margin" 
android:paddingLeft="@dimen/activity_horizontal_margin" 
android:paddingRight="@dimen/activity_horizontal_margin" 
android:paddingTop="@dimen/activity_vertical_margin" 
tools:context="com.example.isummit1.MainActivity" > 

<TextView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_alignParentBottom="true" 
    android:layout_centerHorizontal="true" 
    android:layout_marginBottom="88dp" 
    android:ellipsize="marquee" 
    android:focusable="true" 
    android:focusableInTouchMode="true" 
    android:marqueeRepeatLimit="marquee_forever" 
    android:scrollHorizontally="true" 
    android:singleLine="true" 
    android:text="@string/hold_on_more_things_to_come_soon_" 
    android:textColor="#00FF00" 
    android:textSize="20sp" 
    android:textStyle="italic" /> 

매니페스트에

+2

중복 가능성에 강제하려는 각 활동이 줄을 추가 Android에서 방향 변경 사용 안함?] (http://stackoverflow.com/questions/1512045/how-to-disable-orientation-change-in-android) –

답변

0

이동하여 [방법 특정 방향 세로 또는 가로의

android:screenOrientation="landscape" android:configChanges="orientation|keyboardHidden|screenSize"

관련 문제