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


C# EditText.SetOnKeyListener方法代码示例

本文整理汇总了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);
			}
开发者ID:SeanmanX,项目名称:opandroid,代码行数:29,代码来源:ChatActivity.cs

示例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
		}
开发者ID:richardkeller411,项目名称:dev-days-labs,代码行数:22,代码来源:MainActivity.cs

示例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 ();
        }
开发者ID:jkstrawn,项目名称:wanikani_android,代码行数:22,代码来源:StudyActivity.cs

示例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);
        }
开发者ID:mokth,项目名称:merpV3,代码行数:59,代码来源:InvItemActivity.cs


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