Issue
First time I've ever tried this so do not know about it but need it fixed ASAP. Im trying to make it do a new intent when i rotate the device to landscape.
Here's my code:
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
// Checks the orientation of the screen
if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
Toast.makeText(this, "landscape", Toast.LENGTH_SHORT).show();
Intent i = new Intent(getApplicationContext(),
VideoLandscape.class);
i.putExtra("url", LINK);
i.putExtra("small", videoPath);
startActivity(i);
} else if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT){
Toast.makeText(this, "portrait", Toast.LENGTH_SHORT).show();
}
}
//Manifest
<activity
android:name="com.****.media.tv.Video"
android:configChanges="orientation|keyboardHidden"
android:label="@string/title_TV">
</activity>
<activity
android:name="com.****.media.tv.VideoLandscape"
android:label="@string/title_TV">
</activity>
Many Thanks Charlton Santana
Solution
android:configChanges="keyboardHidden|orientation|screenSize"
in activity tag of meanifeast
Answered By - Sanket Kachhela
Answer Checked By - Clifford M. (JavaFixing Volunteer)