本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例5: OnNothingSelected
void AdapterView.IOnItemSelectedListener.OnNothingSelected(AdapterView parent)
{
if (OnNothingSelected != null)
{
OnNothingSelected();
}
}
示例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);
}
}
示例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);
}
示例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);
}
示例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));
}
示例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;
}
}
示例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;
}
示例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);
}
示例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 ();
}
示例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 ();
}
示例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);
}