我做了什么...在清单中,到活动部分,添加:android:configChanges="keyboardHidden|orientation"在活动的代码中,实现了://used in onCreate() and onConfigurationChanged() to set up the UI elementspublic void InitializeUI(){ //get views from ID's this.textViewHeaderMainMessage = (TextView) this.findViewById(R.id.TextViewHeaderMainMessage); //etc... hook up click listeners, whatever you need from the Views}//Called when the activity is first created.@Overridepublic void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.main); InitializeUI();}//this is called when the screen rotates.// (onCreate is no longer called when screen rotates due to manifest, see: android:configChanges)@Overridepublic void onConfigurationChanged(Configuration newConfig){ super.onConfigurationChanged(newConfig); setContentView(R.layout.main); InitializeUI();}