xamarin-使用xamarin.essentials 自带的mediapicker控件进行照相,设备闪崩解决
作者:互联网
android项目中的MainActivity.cs中的添加下面重写的方法:
// TODO 尝试解决照片功能导致APP闪崩问题 protected override void OnSaveInstanceState(Bundle outState) { base.OnSaveInstanceState(outState); if (outState != null) outState.Clear(); }
标签:xamarin,outState,essentials,控件,MainActivity,闪崩,OnSaveInstanceState 来源: https://www.cnblogs.com/lishidefengchen/p/15162638.html