/* * public override bool OnNavigateUp() * { * LogsManager.Instance.Debug("OnNavigateUp"); * * return base.OnNavigateUp(); * } * * public override bool OnOptionsItemSelected(IMenuItem item) * { * LogsManager.Instance.Debug("OnOptionsItemSelected"); * * return base.OnOptionsItemSelected(item); * } * * public override bool OnCreateOptionsMenu(IMenu menu) * { * LogsManager.Instance.Debug("OnCreateOptionsMenu"); * * MenuInflater.Inflate(Resource.Menu.PackagesPickerMenu, menu); * return base.OnCreateOptionsMenu(menu); * } * * public override bool OnPrepareOptionsMenu(IMenu menu) * { * LogsManager.Instance.Debug("OnPrepareOptionsMenu"); * * return base.OnPrepareOptionsMenu(menu); * } */ private void InitUI() { SetContentView(Resource.Layout.PackagesPicker); ListView applicationsListView = FindViewById <ListView>(Resource.Id.packages_picker_applications); m_applicationsAdapter = new ApplicationsListAdapter(this); applicationsListView.Adapter = m_applicationsAdapter; Toolbar toolbar = FindViewById <Toolbar>(Resource.Id.packages_picker_toolbar); toolbar.SetTitleTextColor(Android.Graphics.Color.White); SetActionBar(toolbar); //ActionBar.SetDisplayHomeAsUpEnabled(true); //ActionBar.SetHomeButtonEnabled(true); //ActionBar.SetDisplayShowHomeEnabled(true); }
private void InitUI() { SetContentView(Resource.Layout.package_chooser_activity_layout); txtTitle = FindViewById <TextView>(Resource.Id.chooser_title); applicationsListView = FindViewById <ListView>(Resource.Id.packages_picker_applications); txtTitle.Text = title; m_applicationsAdapter = new ApplicationsListAdapter(this); applicationsListView.Adapter = m_applicationsAdapter; applicationsListView.ItemClick += (object sender, ItemClickEventArgs e) => { m_applications[e.Position].Selected = !m_applications[e.Position].Selected; if (m_applicationsAdapter != null) { m_applicationsAdapter.NotifyDataSetChanged(); } }; }