Xamarin Android:使用ScrollView会使小部件无法工作
我一直在尝试使用Xamarin开发简单的Android小部件 使用包含内容的LinearLayout时:Xamarin Android:使用ScrollView会使小部件无法工作,android,xamarin,widget,Android,Xamarin,Widget,我一直在尝试使用Xamarin开发简单的Android小部件 使用包含内容的LinearLayout时: <LinearLayout xmlns:p1="http://schemas.android.com/apk/res/android" p1:orientation="vertical" p1:layout_width="match_parent" p1:layout_height="wrap_content" p1:id="@+id/linearLay
<LinearLayout xmlns:p1="http://schemas.android.com/apk/res/android"
p1:orientation="vertical"
p1:layout_width="match_parent"
p1:layout_height="wrap_content"
p1:id="@+id/linearLayout1"
p1:minWidth="25px"
p1:minHeight="25px">
<Button
p1:text="Button"
p1:layout_width="match_parent"
p1:layout_height="wrap_content"
p1:id="@+id/button1" />
</LinearLayout>
一切正常,但当然,当我添加例如10个按钮时,我无法滚动我的小部件来访问每个按钮
添加滚动视图时:
<LinearLayout xmlns:p1="http://schemas.android.com/apk/res/android"
p1:orientation="vertical"
p1:layout_width="match_parent"
p1:layout_height="wrap_content"
p1:id="@+id/linearLayout1"
p1:minWidth="25px"
p1:minHeight="25px">
<ScrollView
p1:minWidth="25px"
p1:minHeight="25px"
p1:layout_width="match_parent"
p1:layout_height="wrap_content"
p1:id="@+id/scrollView1">
<LinearLayout
p1:orientation="vertical"
p1:minWidth="25px"
p1:minHeight="25px"
p1:layout_width="match_parent"
p1:layout_height="match_parent"
p1:id="@+id/linearLayout2">
<Button
p1:text="Button"
p1:layout_width="match_parent"
p1:layout_height="wrap_content"
p1:id="@+id/button1" />
</LinearLayout>
</ScrollView>
</LinearLayout>
我的小部件无法运行(加载小部件时出现问题
)
我还没有添加任何后端代码。如何解决我的问题?添加生成的错误,如果没有这些信息,将无法提供帮助。如何访问错误?在我的手机上运行widget时,我在加载widget时只遇到了
问题尝试调试你的应用程序并查看输出,否则使用android SDK上的监视器工具并从你的应用程序中查找消息