【发布时间】:2020-01-22 11:03:43
【问题描述】:
我正在使用使用本机相机的 Xamarin 表单应用程序。我正在尝试从表单切换到本机,然后返回到基于https://github.com/supreettare/Forms2Native2Forms/blob/master/FormsBasics.Android/FormsActivity.cs的表单
在安卓中: SetPage(App.GetSecondPage());
在表格中:
public static Page GetSecondPage ()
{
var formsPage = new NavigationPage (new MyThirdPage ());
return formsPage;
}
我担心的是,当我调用这个函数时,它会给出 android.view.InflateException: Binary XML file line #1: Error inflating class。
如果我执行 SetPage(new GetSecondPage()),我可以导航到另一个页面,但是 不能在该页面的任何位置使用 Navigation.PushAsync()。
【问题讨论】:
-
这正是我上面提到的我正在做的事情,但是这样做我得到了上面的错误。我将图像字节作为页面构造函数中的参数传递。它看起来像 SetPage(App.RetryPage(imageBytes));
标签: android xamarin xamarin.android navigation