Answer the question
In order to leave comments, you need to log in
Why does it work once?
There is an application on the phone, it has a function that reacts to a change in position, but it is apparently not always called. Here is a video of the application ==>
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>
Answer the question
In order to leave comments, you need to log in
try this: https://docs.microsoft.com/en-us/xamarin/essential...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question