所以我有一個活動Android的方向招
我需要它保持方向相同,一個設備是,當用戶打開活動(所以如果活動被打開時的景觀Web視圖 - >保持這種..如果肖像! - >記住這)
所以
- 不需要XML清單符號..我不希望強制一個特定的方向,只是爲了讓開一個!
這兩個試作無可奈何:
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(null);
或
public void onConfigurationChanged(Configuration newConfig) {
newConfig.orientation = getResources().getConfiguration().orientation;
super.onConfigurationChanged(newConfig);
所以想法?
再次不想強制一個特定的方向..只要保持活動實例化的那個! – pulancheck1988