• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Widget.AdapterView类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Android.Widget.AdapterView的典型用法代码示例。如果您正苦于以下问题:C# AdapterView类的具体用法?C# AdapterView怎么用?C# AdapterView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AdapterView类属于Android.Widget命名空间,在下文中一共展示了AdapterView类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: OnListItemClick

        void OnListItemClick(object sender, AdapterView.ItemClickEventArgs e)
        {
            var detail = detailList[e.Position];

            CallEntity callEntity = CallWrapper.WrapCall(UserData.CPRNR, CallUtil.StatusCode.Active, category, Title, detail);
            Call.MakeCall(callEntity, this);
        }
开发者ID:dsb92,项目名称:patientcare,代码行数:7,代码来源:DetailChoiceActivity.cs


示例2: SpinnerItemSelected

        private void SpinnerItemSelected(object sender, AdapterView.ItemSelectedEventArgs e)
        {
            var spinner = Spinner;
            if (spinner == null)
                return;

            var newValue = spinner.Adapter.GetRawItem(e.Position);

            bool changed;
            if (newValue == null)
            {
                changed = (_currentValue != null);
            }
            else
            {
                changed = !(newValue.Equals(_currentValue));
            }

            if (!changed)
            {
                return;
            }

            _currentValue = newValue;
            FireValueChanged(newValue);
        }
开发者ID:talisqualis,项目名称:MvvmCross-Build,代码行数:26,代码来源:MvxSpinnerSelectedItemBinding.cs


示例3: GridOnItemClick

 void GridOnItemClick(object sender, AdapterView.ItemClickEventArgs itemClickEventArgs)
 {
     var intent = new Intent(Activity, typeof(FriendActivity));
     intent.PutExtra("Title", friends[itemClickEventArgs.Position].Title);
     intent.PutExtra("Image", friends[itemClickEventArgs.Position].Image);
     StartActivity(intent);
 }
开发者ID:RyanKonz,项目名称:Xam.NavDrawer,代码行数:7,代码来源:BrowseFragment.cs


示例4: OnItemClick

 private void OnItemClick(object sender, AdapterView.ItemClickEventArgs e)
 {
     var person = _people[e.Position];
     var intent = new Intent(this, typeof(PersonDetailActivity));
     intent.PutExtra("PersonId", person.Id);
     StartActivity(intent);
 }
开发者ID:ezeh2,项目名称:ezeh2.github.io,代码行数:7,代码来源:PeopleOverviewActivity.cs


示例5: OnNothingSelected

 void AdapterView.IOnItemSelectedListener.OnNothingSelected(AdapterView parent)
 {
     if (OnNothingSelected != null)
     {
         OnNothingSelected();
     }
 }
开发者ID:jlarsson,项目名称:Gas,代码行数:7,代码来源:OnItemSelectedListener.cs


示例6: OnGridThemeChanged

		void OnGridThemeChanged (object sender, AdapterView.ItemSelectedEventArgs e)
		{
			if (e.Position == 0) 
			{
				sfGrid.GridStyle = defaultStyle;
				sfGrid.AlternatingRowColor = Color.Rgb (206, 206, 206);
			}
			if (e.Position == 1) 
			{
				sfGrid.GridStyle = darkStyle;
				sfGrid.AlternatingRowColor = Color.Rgb (25, 25, 25);
			}
			if (e.Position == 2) 
			{
				sfGrid.GridStyle = blueStyle;
				sfGrid.AlternatingRowColor = Color.Rgb (230, 239, 237);
			}
			if (e.Position == 3) 
			{
				sfGrid.GridStyle = redStyle;
				sfGrid.AlternatingRowColor = Color.Rgb (252, 242, 240);
			}
			if (e.Position == 4) 
			{
				sfGrid.GridStyle = greenStyle;
				sfGrid.AlternatingRowColor = Color.Rgb (248, 249, 229);
			}
		}
开发者ID:IanLeatherbury,项目名称:tryfsharpforms,代码行数:28,代码来源:Styles.cs


示例7: ListView_ItemLongClick

 void ListView_ItemLongClick(object sender, AdapterView.ItemLongClickEventArgs e)
 {
     DialogAdapter dialogAdapter = this.ListAdapter as DialogAdapter;
     Element elem = dialogAdapter.ElementAtIndex(e.Position);
     if (elem != null && elem.LongClick != null)
         elem.LongClick(sender, e);
 }
开发者ID:benhorgen,项目名称:MonoCross-Example,代码行数:7,代码来源:DialogActivity.cs


示例8: OnItemClick

		void OnItemClick (object sender, AdapterView.ItemClickEventArgs e)
		{
			TreeItem selectedItem = DC.CurrentList[e.Position];
			var newData = DC.AddNewDataForLevel (selectedItem);
			var exp = new Expand<TreeItem> (DC);
			exp.ManipulateCollection (selectedItem, newData);
		}
开发者ID:jamcneil,项目名称:CodeForStudents,代码行数:7,代码来源:MainActivity.cs


示例9: mListView_itemClick

 private void mListView_itemClick(object sender, AdapterView.ItemClickEventArgs e)
 {
     var v = mListView.Adapter.GetView(e.Position, null, null);
     var idaccount = (TextView)v.FindViewById(Resource.Id.Manage_Selecteedtable_Name);
     IDACCOUNT = idaccount.Text;
     StartActivity(typeof(WP_CustomerOrder));
 }
开发者ID:pchmura,项目名称:Munch,代码行数:7,代码来源:WaiterPortal.cs


示例10: _list_ItemClick

        private void _list_ItemClick(object sender, AdapterView.ItemClickEventArgs e)
        {
            var bm = ((HomeAdapter)_list.Adapter).GetRow(e.Position);
            var intent = new Intent();
            switch (bm.SortOrder)
            {
                case 0:
                    if (!String.IsNullOrEmpty(bm.Day))
                    {   // use date
                        intent.SetClass(this, typeof(SessionsActivity));
                        intent.PutExtra("SelectedDateTime", bm.Day);
                    }
                    else
                    {   // use session
                        intent.SetClass(this, typeof(SessionActivity));
                        intent.PutExtra("Code", bm.SessCode);
                    }
                    StartActivity(intent);
                    break;
                case 1:
                    intent.SetClass(this, typeof(SessionsActivity));
                    intent.PutExtra("SelectedDate", bm.Day);

                    StartActivity(intent);
                    break;
                case 2:
                    // for future use
                    break;
            }
        }
开发者ID:nishanil,项目名称:Android-App-for-Windows-Azure-Conference,代码行数:30,代码来源:HomeActivity.cs


示例11: OnItemClick

 public void OnItemClick(AdapterView parent, View view, int position, long id)
 {
     FragmentTransaction t = FragmentManager.BeginTransaction();
     dialog_ingredient dialog = new dialog_ingredient();
     dialog.Show(t, "dialog fragment");
     dialog.myOnUpdateComplete += Dialog_myOnUpdateComplete;
 }
开发者ID:kitchensupport,项目名称:mobileapp,代码行数:7,代码来源:MainActivity.cs


示例12: OnItemClick

        public void OnItemClick(AdapterView parent, View view, int position, long id)
        {
            var soundEffect = Sounds.Tap;

            switch (position)
            {
                case 0:
                    StartActivity(new Intent(this, typeof (CardsActivity)));
                    break;

                case 1:
                    StartActivity(new Intent(this, typeof (BingImagesActivity)));
                    break;

                case 2:
                    StartActivity(new Intent(this, typeof(SelectGestureDemoActivity)));
                    break;

                case 3:
                    StartActivity(new Intent(this, typeof (ThemingActivity)));
                    break;

                default:
                    soundEffect = Sounds.Error;
                    break;
            }

            // Play sound.
            var am = (AudioManager) GetSystemService(Context.AudioService);
            // wonky cast
            am.PlaySoundEffect((SoundEffect) soundEffect);
        }
开发者ID:42Spikes,项目名称:F2S,代码行数:32,代码来源:MainActivity.cs


示例13: examineTeamSpinner_ItemSelected

		private void examineTeamSpinner_ItemSelected (object sender, AdapterView.ItemSelectedEventArgs e)
		{
			Spinner spinner = (Spinner)sender;
			String selTeam = (string)spinner.GetItemAtPosition (e.Position);
			currentTeam = simLeague.leagueTeams.Find (t => t.name == selTeam);
			updateCurrTeam ();
		}
开发者ID:jonesguy14,项目名称:SportSim,代码行数:7,代码来源:SeasonActivity.cs


示例14: spinner_ItemSelected

		private void spinner_ItemSelected (object sender, AdapterView.ItemSelectedEventArgs e)
		{
			Spinner spinner = (Spinner)sender;

			string toast = string.Format ("Selection: {0}", spinner.GetItemAtPosition (e.Position));
			Toast.MakeText (this, toast, ToastLength.Long).Show ();
		}
开发者ID:mhalkovitch,项目名称:Xamarim,代码行数:7,代码来源:SpinnerActivity.cs


示例15: stateSpin_ItemSelected

		private void stateSpin_ItemSelected (object sender, AdapterView.ItemSelectedEventArgs e)
		{
			Spinner spinner = (Spinner)sender;

			var main = new Intent (this, typeof(MainActivity));

			TextView selectedState = FindViewById<TextView> (Resource.Id.stateSelected);

			string selectedItem = Convert.ToString (spinner.GetItemAtPosition (e.Position));
			string selStateString;

			if (selectedItem != "State") {
				selStateString = string.Format ("Thou Art At {0}", spinner.GetItemAtPosition (e.Position));
			} else {
				selStateString = string.Empty;
			}
				
			selectedState.SetText (selStateString,TextView.BufferType.Normal);

			stateSelection = selectedItem;
			main.PutExtra("settings", ConstructedResult(stateSelection, regionSelection));

//			main.PutExtra ("stateSel", selectedStateToMain);
			SetResult (Result.Ok, main);

		}
开发者ID:ampentium2,项目名称:MalaysiaAPI,代码行数:26,代码来源:SettingsActivity.cs


示例16: namespacesList_ItemClick

        private void namespacesList_ItemClick(object sender, AdapterView.ItemClickEventArgs e)
        {
            var option = e.View.FindViewById<CheckedTextView>(Resource.Id.NamespaceOption);

            if (!_adapter.CurrentNamespaces.Contains(option.Text))
            {
                option.Checked = true;
                _adapter.CurrentNamespaces.Add(option.Text);

                MessageHub.Instance.Publish(new AddNamespaceMessage(this, option.Text));
            }
            else
            {
                if (_preferences.GetBoolean(PreferenceKeys.ShowRemoveNamespaceMessage, true))
                {
                    new AlertDialog.Builder(this)
                        .SetTitle(Resource.String.RemoveNamespaceMessageTitle)
                        .SetMessage(Resource.String.RemoveNamespaceMessageContent)
                        .SetPositiveButton(Resource.String.RemoveNamespaceMessageOkButton, (s, a) => { })
                        .Show();

                    // disabling this for now so the message will get shown every time
                    // may or may not decide to add this back in
                    //_preferences
                    //    .Edit()
                    //    .PutBoolean(PreferenceKeys.ShowRemoveNamespaceMessage, false)
                    //    .Commit();
                }
            }
        }
开发者ID:jorik041,项目名称:CSharpToGo,代码行数:30,代码来源:UpdateNamespacesActivity.cs


示例17: OnItemClick

 private void OnItemClick(object sender, AdapterView.ItemClickEventArgs e)
 {
     var borrowersListView = (BorrowersListView)Element;
     var enumerable = borrowersListView.Items;
     var borrowers = enumerable.ToList();
     borrowersListView.NotifyItemSelected(borrowers[e.Position-1]);
 }
开发者ID:ElijahReva,项目名称:LoanCounter,代码行数:7,代码来源:BorrowersListViewRender.cs


示例18: moviesSpinner_ItemSelected

        void moviesSpinner_ItemSelected(object sender, AdapterView.ItemSelectedEventArgs e)
        {
            Spinner spinner = (Spinner)sender;

            string toast = string.Format(spinner.GetItemAtPosition(e.Position).ToString());
            Toast.MakeText(this, toast, ToastLength.Long).Show();
        }
开发者ID:vkoppaka,项目名称:31DaysOfXamarinAndroid,代码行数:7,代码来源:MainActivity.cs


示例19: ListView_ItemClick

		void ListView_ItemClick(object sender, AdapterView.ItemClickEventArgs e)
		{
			var elem = this.DialogAdapter[e.Position] as Element;

			if (elem != null && elem.Click != null)
				elem.Click();
		}
开发者ID:imgen,项目名称:MonoDroid.Dialog,代码行数:7,代码来源:DialogActivity.cs


示例20: ItemSelectedHandler

		void ItemSelectedHandler( object sender, AdapterView.ItemSelectedEventArgs e) 
		{
			Spinner spinner = (Spinner)sender;
			var makeToPass = Convert.ToString (spinner.GetItemAtPosition (e.Position));
			mListener.passMake (makeToPass);

		}
开发者ID:Cmaster14,项目名称:WilliesCycleApps,代码行数:7,代码来源:SearchMakeFragment.cs



注:本文中的Android.Widget.AdapterView类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Widget.SeekBar类代码示例发布时间:2022-05-24
下一篇:
C# Views.ViewGroup类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap