public override void OnConfigurationChanged(Configuration newConfig)
{
base.OnConfigurationChanged(newConfig);
if (newConfig.Orientation == Android.Content.Res.Orientation.Portrait)
{
Toast.MakeText(this, "go", ToastLength.Long).Show();
}
else if (newConfig.Orientation == Android.Content.Res.Orientation.Landscape)
{
Toast.MakeText(this, "go", ToastLength.Long).Show();
}
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="1"
android:versionName="1.0"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|navigation"
package="com.companyname.app_6_">
<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="28" />
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme" >
</application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>