mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-21 20:49:36 +01:00
Fix orientation
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
84ea98aa12
commit
8756c006c8
@ -43,6 +43,7 @@
|
||||
<activity
|
||||
android:name=".activities.CallActivity"
|
||||
android:launchMode="singleTask"
|
||||
android:configChanges="orientation|screenSize"
|
||||
/>
|
||||
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
package com.nextcloud.talk.activities;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
@ -812,4 +813,17 @@ public class CallActivity extends AppCompatActivity {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
|
||||
// Checks the orientation of the screen
|
||||
if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
remoteRenderersLayout.setOrientation(LinearLayout.HORIZONTAL);
|
||||
} else if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT){
|
||||
remoteRenderersLayout.setOrientation(LinearLayout.VERTICAL);
|
||||
}
|
||||
|
||||
super.onConfigurationChanged(newConfig);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user