1
當xamarin中的鍵盤popsUp形成android並且EditText字段位於屏幕底部時,狀態欄和屏幕完全向上移動。我試着用在xamarin中移動時形成鍵盤出現時的android
WindowSoftInputMode = SoftInput.AdjustPan
和
WindowSoftInputMode = SoftInput.AdjustResize
但遺憾的是都沒有工作,我還杵都 從一個博客帖子我read把
Xamarin.Forms.Application.Current.On<Xamarin.Forms.PlatformConfiguration.Android>().UseWindowSoftInputModeAdjust(WindowSoftInputModeAdjust.Resize);
和
if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop)
{
Window.DecorView.SystemUiVisibility = 0;
var statusBarHeightInfo = typeof(FormsAppCompatActivity).GetField("_statusBarHeight", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
statusBarHeightInfo.SetValue(this, 0);
Window.SetStatusBarColor(new Android.Graphics.Color(0,0,0, 255)); // Change color as required.
}
啓動後應用程序是一種替代方案,但不幸的是,這也失敗了。還有其他選擇嗎?