本文整理汇总了C#中ImageView.SetOnClickListener方法的典型用法代码示例。如果您正苦于以下问题:C# ImageView.SetOnClickListener方法的具体用法?C# ImageView.SetOnClickListener怎么用?C# ImageView.SetOnClickListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ImageView
的用法示例。
在下文中一共展示了ImageView.SetOnClickListener方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate (bundle);
//Thread.Sleep(10000); // Simulate a long loading process on app startup.
// Set our view from the "main" layout resource
SetContentView (Resource.Layout.activity_register_main);
/*Setting flat name in Spinner control */
Spinner spinner = FindViewById<Spinner> (Resource.Id.flatspinner);
spinner.ItemSelected += new EventHandler<AdapterView.ItemSelectedEventArgs> (spinner_ItemSelected);
var adapter = ArrayAdapter.CreateFromResource (
this, Resource.Array.Flats_array, Android.Resource.Layout.SimpleSpinnerItem);
adapter.SetDropDownViewResource (Android.Resource.Layout.SimpleSpinnerDropDownItem);
spinner.Adapter = adapter;
/*end*/
/*create or open database*/
myDb = new my_SqliteDatabaseHelper(this);
/*end create or open database*/
errorIcon = Resources.GetDrawable(Resource.Drawable.correcticon);
correctIcon = Resources.GetDrawable(Resource.Drawable.erroricon);
imageview_profile= FindViewById<ImageView> (Resource.Id.imageview_profile);
etname = FindViewById<EditText> (Resource.Id.etname);
etAge = FindViewById<EditText>(Resource.Id.etAge);
etUsername = FindViewById<EditText>(Resource.Id.etUsername);
//etFlatNo = FindViewById<EditText>(Resource.Id.etFlatNo);
etpwd = FindViewById<EditText>(Resource.Id.etpwd);
etEmail = FindViewById<EditText>(Resource.Id.etEmail);
etEmail.TextChanged += (object sender, Android.Text.TextChangedEventArgs e) =>
{
if (IsValidEmail(e.Text.ToString()))
{
//change icon to green
etEmail.SetError("right", errorIcon);
//emailEditText.SetError(
}
else
{
//emailEditText.set
etEmail.SetError("wrong", correctIcon);
//change icon to red
}
};
bSignUp= FindViewById <Button>(Resource.Id.bSignUp);
tvLoginLink = FindViewById<TextView> (Resource.Id.tvLoginLink);
bSignUp.SetOnClickListener(this);
tvLoginLink.SetOnClickListener (this);
imageview_profile.SetOnClickListener (this);
//bLogout.Click += DoClick ();
//btSave.Click += DoClick ();
}