Xamarin表单InputTransparent在Android上不起作用

时间:2017-01-26 15:58:08

标签: xamarin xamarin.android

这是我的xaml。 InputTransparent设置为true,但Entry仍然捕获输入。

gcc sample.cpp -lmgl-qt -lmgl

2 个答案:

答案 0 :(得分:3)

发现了一些有关此问题的错误报告,它似乎比网格中的Entry和DatePicker更具普遍性。

请参阅:

https://bugzilla.xamarin.com/show_bug.cgi?id=50992
https://bugzilla.xamarin.com/show_bug.cgi?id=50362

我将此问题的信息添加到报告中,让他们知道它似乎比上述错误报告中提到的特定方案更具普遍性。

答案 1 :(得分:1)

我有同样的问题(InputTransparent没有工作问题仍然是实际的)

我想在自定义的水合形式对象中避免用户输入,而不必处理禁用的输入渲染(禁用开关的示例,即使转换为灰色也是灰色的)。

为此,我只使用网格作为示例,并在其上方使用stackLayout,因此用户无法与我的所有表单(条目,开关等)进行交互:

grid.Children.Add(form.MainLayout);
//Trick to avoid user inputs
grid.Children.Add(new StackLayout { BackgroundColor = Color.Transparent, VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand });
scrollView.Content = grid;
Content = scrollView;
相关问题