protected override void OnResume()
        {
            base.OnResume();
            PluginDatabase pluginDb = new PluginDatabase(this);

            _items = (from pluginPackage in pluginDb.GetAllPluginPackages()
                      let version = PackageManager.GetPackageInfo(pluginPackage, 0).VersionName
                                    let enabledStatus = pluginDb.IsEnabled(pluginPackage) ? GetString(Resource.String.plugin_enabled) : GetString(Resource.String.plugin_disabled)
                                                        select new PluginItem(pluginPackage, enabledStatus, this)).ToList();

            /*
             *      {
             *              new PluginItem("PluginA", Resource.Drawable.Icon, "keepass2android.plugina", "connected"),
             *              new PluginItem("KeepassNFC", Resource.Drawable.Icon, "com.bla.blubb.plugina", "disconnected")
             *      };
             * */
            _pluginArrayAdapter = new PluginArrayAdapter(this, Resource.Layout.ListViewPluginRow, _items);
            ListAdapter         = _pluginArrayAdapter;
        }
Esempio n. 2
0
 protected override void OnPause()
 {
     base.OnPause();
     ListAdapter = _pluginArrayAdapter = null;
 }