列表视图(在Visual Studio-Xamarin中)不是MainLauncher时不起作用

时间:2019-04-06 19:15:47

标签: c# visual-studio xamarin xamarin.android

我现在正在构建我的应用程序,并且打算制作一个打开屏幕(登录和注册),而这就是我的MainLauncher,所以我这样编码:

[Activity(Label = "@string/app_name", Theme = "@style/AppTheme", MainLauncher = true)]

所以,具有列表视图的屏幕(我的意思是,班级)不是主启动器,

[Activity(Label = "@string/app_name", Theme = "@style/AppTheme", MainLauncher = false)]

但是,当具有列表视图的类不是主启动器时,列表视图的功能(例如public void OnItemClick(AdapterView parent, View view, int position, long id)public bool OnItemLongClick(AdapterView parent, View view, int position, long id))将不起作用。为什么会这样?

我已经尝试过先编码listview类,然后再尝试对打开屏幕进行编码(和相反)。

0 个答案:

没有答案