เช้านี้ฉันเกิดปัญหาขึ้นกับพยายามจัดการกับonConfigurationChangedเหตุการณ์ ปัญหาคือว่าวิธีการที่ฉันแทนที่ไม่ได้รับการเรียกเมื่อฉันเปลี่ยนทิศทางของโทรศัพท์ ไม่ได้รับการโทรเลย
ฉันได้ทำandroid:configChanges="orientation"กิจกรรมที่กำหนดไว้ในรายการตามที่ระบุไว้ในเอกสารประกอบ android แต่สิ่งนี้ไม่ได้สร้างความแตกต่าง
คุณเกิดปัญหานี้ขึ้นหรือไม่?
android:configChanges นี่คือสิ่งที่ google javadoc กล่าวว่า: Note: If your application targets API level 13 or higher (as declared by the minSdkVersion and targetSdkVersion attributes), then you should also declare the "screenSize" configuration, because it also changes when a device switches between portrait and landscape orientations.
