当前位置: 首页>>代码示例>>C#>>正文


C# Widget.AdapterView类代码示例

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


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


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