本文整理汇总了C#中ImageButton.SetOnClickListener方法的典型用法代码示例。如果您正苦于以下问题:C# ImageButton.SetOnClickListener方法的具体用法?C# ImageButton.SetOnClickListener怎么用?C# ImageButton.SetOnClickListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ImageButton
的用法示例。
在下文中一共展示了ImageButton.SetOnClickListener方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCreateView
public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Android.OS.Bundle savedInstanceState)
{
var rootView = inflater.Inflate (Resource.Layout.fragment_list, container, false);
skipPrevious = rootView.FindViewById<ImageButton> (Resource.Id.skip_previous);
skipPrevious.Enabled = false;
skipPrevious.SetOnClickListener (buttonListener);
skipNext = rootView.FindViewById<ImageButton> (Resource.Id.skip_next);
skipNext.Enabled = false;
skipNext.SetOnClickListener (buttonListener);
playPause = rootView.FindViewById<ImageButton> (Resource.Id.play_pause);
playPause.Enabled = true;
playPause.SetOnClickListener (buttonListener);
queueAdapter = new QueueAdapter (Activity);
var listViewClickListener = new ListViewClickListener ();
listViewClickListener.OnItemClickImpl = (parent, view, position, id) => {
var item = queueAdapter.GetItem (position);
transportControls.SkipToQueueItem (item.QueueId);
};
var listView = rootView.FindViewById<ListView> (Resource.Id.list_view);
listView.Adapter = queueAdapter;
listView.Focusable = true;
listView.OnItemClickListener = listViewClickListener;
mediaBrowser = new MediaBrowser (Activity,
new ComponentName (Activity, Java.Lang.Class.FromType (typeof(MusicService))),
connectionCallback, null);
return rootView;
}