Here으로 보았지만 여전히 문제를 해결할 수 없습니다.Android 앱이 항상 가로 모드로 유지됩니다.
나는 최근에 안드로이드 (headfirst)로 뛰어 들었고 주변을 어지럽 혔다. 화면이 기울어 진 방식에 관계없이 내 응용 프로그램을 가로 모드로만 실행하고 싶습니다.
내 홈 화면은 기본적으로 배경과 몇 개의 버튼이 오른쪽에 정렬 된 페이지입니다.
은 여기 내 XML
당신은 당신의AndroidManifest.xml
파일에서 활동 태그에
android:screenOrientation="landscape"
을 둘 필요가
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:paddingLeft = "450px"
android:paddingRight = "60px"
android:paddingTop="25px"
//I have tried adding orientation commands here like the one below??
android:screenOrientation="landscape"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background = "@drawable/sign"
>
<Button
android:id="@+id/Button1"
android.layout_height="60px"
android.layout_width="30px"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:text="Button1"/>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<Button
android:id="@+id/Button2"
android.layout_height="60px"
android.layout_width="30px"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:text="Button2"/>
bahh 나는 잘못된 파일을 변경하고있었습니다. 내가 연결된 다른 질문은 내가 시도한 무언가가 문제가 – sealz