【发布时间】:2016-03-04 23:18:23
【问题描述】:
Xamarin 我更新到版本 4、Forms 和 2.0 版本。在 Android 上,我使用 AppCompat。
我遇到了问题。以前,Android 键盘会导致调整视图大小。现在这不会发生。键盘出现在顶视图上。以及想要隐藏的元素。
我试过了:
[Activity(WindowSoftInputMode = SoftInput.AdjustResize, Label = "Title", Icon = "@drawable/icon", Theme = "@style/MyTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
global::Xamarin.Forms.Forms.Init(this, bundle);
ToolbarResource = Resource.Layout.toolbar;
TabLayoutResource = Resource.Layout.tabs;
LoadApplication(new App());
Window.DecorView.SetFitsSystemWindows(true);
}
}
本课制作了Daylight AppCompat:https://blog.xamarin.com/material-design-for-your-xamarin-forms-android-apps/
谢谢。
【问题讨论】:
标签: xamarin android-softkeyboard xamarin.forms android-appcompat