本文整理汇总了C#中EditText.SetOnKeyListener方法的典型用法代码示例。如果您正苦于以下问题:C# EditText.SetOnKeyListener方法的具体用法?C# EditText.SetOnKeyListener怎么用?C# EditText.SetOnKeyListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EditText
的用法示例。
在下文中一共展示了EditText.SetOnKeyListener方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCreate
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
// Create your application here
SetContentView (Resource.Layout.Chat);
imageCachingServiceConnection = ServiceConnection<Services.ImageCachingService>.Bind (this, downloader);
this.ListAdapter = new ChatAdapter (this, downloader);
ListView listView = FindViewById<ListView> (Android.Resource.Id.List);
listView.ItemsCanFocus = true;
editText = FindViewById<EditText> (Resource.Id.editText);
Button sendButton = FindViewById<Button> (Resource.Id.sendButton);
listView.Touch += (object sender, View.TouchEventArgs e) => {
Logger.Trace ("touch event");
ClearEditFocus ();
};
sendButton.Click += (object sender, EventArgs e) => {
OnSend ();
};
editText.SetOnKeyListener (this);
}
示例2: OnCreate
protected override void OnCreate (Bundle savedInstanceState)
{
base.OnCreate (savedInstanceState);
SetContentView(Resource.Layout.main);
_itemListView = FindViewById<ListView>(Resource.Id.itemListView);
_itemListView.OnItemClickListener = this;
_itemListView.OnItemLongClickListener = this;
_addItemEditText = FindViewById<EditText>(Resource.Id.newItemText);
_addItemEditText.SetOnKeyListener(this);
_addItemEditText.RequestFocus();
InitItemListAdapter();
_taskMgr.TasksUpdated += (sender, e) => {
_listAdapter.Clear();
_listAdapter.AddAll((ICollection)e);
_listAdapter.NotifyDataSetChanged();
};
//Step 11A - Start sync
}
示例3: OnCreate
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate (savedInstanceState);
SetContentView(Resource.Layout.StudyVocab);
parentView = (LinearLayout)FindViewById (Resource.Id.abc);
kanjiText = (TextView) FindViewById (Resource.Id.kanji);
typeText = (TextView) FindViewById (Resource.Id.type);
guessText = (EditText) FindViewById (Resource.Id.shark);
guessText.SetRawInputType (InputTypes.TextFlagNoSuggestions);
guessText.SetOnKeyListener(new MyKeyListener(this));
guessText.AddTextChangedListener (new MyTextListener (this));
var button = FindViewById<Button>(Resource.Id.submit);
button.Click += (sender, e) => {
SubmitGuess();
};
conversion();
DisplayNewWord ();
}
示例4: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate (bundle);
if (!((GlobalvarsApp)this.Application).ISLOGON) {
Finish ();
}
SetContentView (Resource.Layout.InvDtlView);
TRXTYPE= Intent.GetStringExtra ("trxtype") ?? "CASH";
invno = Intent.GetStringExtra ("invoiceno") ?? "AUTO";
CUSTCODE = Intent.GetStringExtra ("custcode") ?? "AUTO";
EDITMODE = Intent.GetStringExtra ("editmode") ?? "AUTO";
if (TRXTYPE == "CASH") {
SetTitle (Resource.String.title_cashitems);
} else SetTitle (Resource.String.title_invoiceitems);
pathToDatabase = ((GlobalvarsApp)this.Application).DATABASE_PATH;
COMPCODE = ((GlobalvarsApp)this.Application).COMPANY_CODE;
rights = Utility.GetAccessRights (pathToDatabase);
isNotAllowEditAfterPrinted = DataHelper.GetInvoicePrintStatus (pathToDatabase,invno,rights);
txtbarcode = FindViewById<EditText> (Resource.Id.txtbarcode);
txtbarcode.Visibility = ViewStates.Visible;
Button butNew= FindViewById<Button> (Resource.Id.butnewItem);
butNew.Click += (object sender, EventArgs e) => {
NewItem(invno);
};
if (isNotAllowEditAfterPrinted)
butNew.Enabled = false;
if (!rights.InvAllowAdd)
butNew.Enabled = false;
Button butInvBack= FindViewById<Button> (Resource.Id.butInvItmBack);
butInvBack.Click += (object sender, EventArgs e) => {
Invoice temp = new Invoice();
UpdateInvoiceAmount(invno,ref temp);
if (EDITMODE.ToLower()=="new")
{
DeleteInvWithEmptyInovItem();
}
Intent intent =null;
if (temp.trxtype=="CASH"){
intent =ActivityManager.GetActivity<CashActivity>(this.ApplicationContext);
}else intent =ActivityManager.GetActivity<InvoiceActivity>(this.ApplicationContext);
StartActivity(intent);
};
txtbarcode.SetOnKeyListener (this);
txtbarcode.InputType = 0;
GetData ();
populate (listData);
listView = FindViewById<ListView> (Resource.Id.invitemList);
listView.ItemClick += OnListItemClick;
//listView.Adapter = new CusotmItemListAdapter(this, listData);
SetViewDlg viewdlg = SetViewDelegate;
listView.Adapter = new GenericListAdapter<InvoiceDtls> (this, listData, Resource.Layout.InvDtlItemViewCS, viewdlg);
}