다른 곳에서도이 사진을 보았습니다. 답변은 일반적으로 "이것은 Android 2.3에서 알려진 문제입니다."4.4는 분명히 사용하고 있습니다. 답이 아닙니다.Android 에뮬레이터가 회전하지만 앱이 다시 그려지지 않습니다.
나는 "Hello, Android"와 같은 가장 단순한 프로그램을 가지고 있습니다. 에뮬레이터를 실행하면 세로 모드로로드됩니다. Fn-Ctrl-F11 (Mac)을 사용하여 에뮬레이터가 가로 모드로 회전합니다. 그러나 응용 프로그램과 전화 컨트롤은 다시 그리지 않습니다. 모든 것이 단지 옆으로 보입니다. 하지만 난 못해,
<LinearLayout 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"
tools:context=".Hello" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world" />
</LinearLayout>
이클립스의 ADT 번들 빌드 v22.3.0-887826으로 짓고 있어요 :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test.helloandroid"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="18"
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.test.helloandroid.Hello"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
및 활동 XML 파일 : 여기
매니페스트의 이 사소한 것에 대해 중요한 것을 상상해보십시오.내 에뮬레이터는 Galaxy Nexus, Android 4.4 API 레벨 19 용입니다. 하드웨어 키보드가 표시되어 있고 표시가없는 하드웨어 키보드로 시도했습니다. 내가 어디에서나 보지 못했던 "키보드 뚜껑 지원"설정에 대한 참조를 발견했습니다.이 주석은 3/12 &에서 나온 것입니다.
이것은 내 첫 번째 Android 앱이므로이 환경에서 디버깅을하는 완전한 초보자입니다. TIA, 내가 누락 된 것에 대한 제안.
편집 : hello.java
package com.test.helloandroid;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
public class Hello extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_hello);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.hello, menu);
return true;
}
}
방향 변경 활동 파괴 재현된다. – Raghunandan
'Hello.java'의 게시 코드 –
Hello 코드를 게시하십시오.java –