• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# EditText类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中EditText的典型用法代码示例。如果您正苦于以下问题:C# EditText类的具体用法?C# EditText怎么用?C# EditText使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



EditText类属于命名空间,在下文中一共展示了EditText类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            Console.WriteLine("EqualizerPresetDetailsActivity - OnCreate");
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.EqualizerPresetDetails);
            ActionBar.SetDisplayHomeAsUpEnabled(true);
            ActionBar.SetHomeButtonEnabled(true);

            _txtPresetName = FindViewById<EditText>(Resource.Id.equalizerPresetDetails_txtPresetName);
            _btnNormalize = FindViewById<Button>(Resource.Id.equalizerPresetDetails_btnNormalize);
            _btnReset = FindViewById<Button>(Resource.Id.equalizerPresetDetails_btnReset);
            _equalizerPresetGraph = FindViewById<EqualizerPresetGraphView>(Resource.Id.equalizerPresetDetails_graphView);
            _btnNormalize.Click += BtnNormalizeOnClick;
            _btnReset.Click += BtnResetOnClick;

            //_txtPresetName.SetOnEditorActionListener(this);

            _listView = FindViewById<ListView>(Resource.Id.equalizerPresetDetails_listView);
            _listAdapter = new EqualizerPresetFadersListAdapter(this, _listView, new EQPreset());
            _listView.SetAdapter(_listAdapter);

            // Save the source activity type for later (for providing Up navigation)
            _sourceActivityType = Intent.GetStringExtra("sourceActivity");
            _presetId = Intent.GetStringExtra("presetId");

            var navigationManager = Bootstrapper.GetContainer().Resolve<MobileNavigationManager>();
            navigationManager.BindEqualizerPresetDetailsView(null, this, new Guid(_presetId));
        }
开发者ID:pascalfr,项目名称:MPfm,代码行数:29,代码来源:EqualizerPresetDetailsActivity.cs


示例2: OnCreate

		protected override void OnCreate(Bundle icicle)
		{
			base.OnCreate(icicle);
			if (!LibsChecker.CheckVitamioLibs(this))
				return;
			SetContentView(Resource.Layout.videoview);
			mEditText = FindViewById<EditText>(Resource.Id.url);
			mVideoView = (VideoView) FindViewById<VideoView>(Resource.Id.surface_view);
			if (path == "")
			{
				// Tell the user to provide a media file URL/path.
				Toast.MakeText(this, "Please edit VideoViewDemo Activity, and set path" + " variable to your media file URL/path", ToastLength.Long).Show();
				return;
			}
			else
			{
				//            
				//			 * Alternatively,for streaming media you can use
				//			 * mVideoView.setVideoURI(Uri.parse(URLstring));
				//			 
				mVideoView.SetVideoPath(path);
				mVideoView.SetMediaController(new IO.Vov.Vitamio.Widget.MediaController(this));
				mVideoView.RequestFocus();
				mVideoView.Prepared += (object sender, MediaPlayer.PreparedEventArgs e) => e.P0.SetPlaybackSpeed (1.0f);
			}

		}
开发者ID:shaxxx,项目名称:Xamarin.Vitamio,代码行数:27,代码来源:VideoViewDemo.cs


示例3: OnCreate

		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			// Set our view from the "main" layout resource
			SetContentView (Resource.Layout.Main);

			// Get our button from the layout resource,
			// and attach an event to it
			GetButton = FindViewById<Button> (Resource.Id.GetButton);
			ResultTextView = FindViewById<TextView> (Resource.Id.ResultTextView);
			ResultEditText = FindViewById<EditText> (Resource.Id.ResultEditText);
			DownloadedImageView = FindViewById<ImageView> (Resource.Id.DownloadedImageView);

			GetButton.Click += async (sender, e) => {
				
				Task<int> sizeTask = DownloadHomePageAsync();

				ResultTextView.Text = "Loading...";
				ResultEditText.Text = "Loading...\n";

				DownloadedImageView.SetImageResource ( Android.Resource.Drawable.IcMenuGallery);

				var length = await sizeTask;

				ResultTextView.Text = "length:  " + length;

			};

		}
开发者ID:aragorn55,项目名称:ClassSampleCode,代码行数:30,代码来源:MainActivity.cs


示例4: OnCreateView

        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            RelativeLayout view = (RelativeLayout)inflater.Inflate (Resource.Layout.raffledetail_gettemppass, container, false);
            rootview = view;

            TextView hinttextview=(TextView)view.FindViewById (Resource.Id.gettemppass_hinttext_textview);
            hinttextview.Text = RequestTPScreenData.ProvideClientInfoTextViewText;

            emailorphone = (EditText)view.FindViewById (Resource.Id.gettemppass_emailorphone_edittext);
            emailorphone.Hint = RequestTPScreenData.ClientInfoTextFieldPlaceholder;

            requesttemppass = (Button)view.FindViewById (Resource.Id.gettemppass_requesttemppass_button);
            requesttemppass.Text = RequestTPScreenData.RequestTPBtnTitle;
            //send web request
            requesttemppass.Click+=OnRequestTempPassClick;

            TextView signuptextview=view.FindViewById<TextView> (Resource.Id.gettemppass_register_textview);
            nn_activity.SetClickAbleText (signuptextview,RequestTPScreenData.DontHaveAccountLabelText+RequestTPScreenData.SignUpBtnTitle,RequestTPScreenData.SignUpBtnTitle,()=>{

                if(FormatManager.chechinput(emailorphone.Text,FormatManager.FormatOption.Email)){
                    (nn_activity as HomeScreen).ShowBuyerSignUp(emailorphone.Text);
                }
                else{
                    (nn_activity as HomeScreen).ShowBuyerSignUp("");
                }

            });

            return view;
        }
开发者ID:MADMUC,项目名称:TAP5050,代码行数:30,代码来源:RaffleGetTempPassFragment.cs


示例5: Screen7Summary

        public Screen7Summary(Activity context, PointDto point)
            : base(context, Resource.Layout.Edit7Summary, point)
        {
            PointPart7Summary item = Point.PointDataDto.PointPart7Summary;

            invalidMoveAvailable = View.FindViewById<Spinner>(Resource.Id.invalid_move_availability);
            invalidHearingAvailable = View.FindViewById<Spinner>(Resource.Id.invalid_hearing_availability);
            invalidEyeAvailable = View.FindViewById<Spinner>(Resource.Id.invalid_eye_availability);
            otherText = View.FindViewById<EditText>(Resource.Id.otherComments);
            reportDate = View.FindViewById<EditText>(Resource.Id.protocolDate);

            invalidMoveAvailable.Adapter = new BoolSpinnerAdapter(context, "ќбъект доступен",
                                                                  "ќбъект не доступен (если нет пандуса, не соответствует ширина проемов, высота порогов)");
            invalidHearingAvailable.Adapter = new BoolSpinnerAdapter(context, "ќбъект доступен",
                                                                     "ќбъект не доступен (если отсутствуют световые табло, индукционна¤ петл¤)");
            invalidEyeAvailable.Adapter = new BoolSpinnerAdapter(context, "ќбъект доступен",
                                                                 "ќбъект не доступен (если отсутствуют тактильные маршруты, звуковое оповещение, контрастна¤ маркировка дверей и стекл¤нных поверхностей)");

            reportDate.Text = item.ReportDate.ToLocalTime().Date.ToString(CultureInfo.CurrentCulture);

            invalidMoveAvailable.SetSelection(BoolSpinnerAdapter.SetPositionOf(item.InvalidMoveAvailability));
            invalidHearingAvailable.SetSelection(BoolSpinnerAdapter.SetPositionOf(item.InvalidHearingAvailability));
            invalidEyeAvailable.SetSelection(BoolSpinnerAdapter.SetPositionOf(item.InvalidEyeAvailability));

            otherText.Text = item.OtherComments;
        }
开发者ID:Teplitsa,项目名称:bezpregrad,代码行数:26,代码来源:Screen7Summary.cs


示例6: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            // Set our view from the "main" layout resource
            SetContentView (Resource.Layout.Main);

            // Get our button from the layout resource,
            // and attach an event to it
            _MomentId = FindViewById<EditText> (Resource.Id.moment_id);
            _MomentValue = FindViewById<EditText> (Resource.Id.moment_value);
            _ButtonMoment = FindViewById<Button> (Resource.Id.btn_moment);
            _ButtonStart = FindViewById<Button> (Resource.Id.btn_start);

            _ButtonStart.Click += delegate {
                StartActivity(typeof(SecondaryActivity));
            };

            _ButtonMoment.Click += delegate {
                String momentId = _MomentId.Text;
                double? momentValue = _MomentValue.Text.Length > 0 ? (double?)Double.Parse(_MomentValue.Text) : null;

                if (!momentValue.HasValue) {
                    Kiip.Instance.SaveMoment(momentId, this);
                } else {
                    Kiip.Instance.SaveMoment(momentId, momentValue.Value, this);
                }
            };
        }
开发者ID:kiip,项目名称:xamarin-plugin,代码行数:29,代码来源:MainActivity.cs


示例7: IsLoginFormValidate

		public bool IsLoginFormValidate(EditText email, EditText password, ref View focus) {
			var icon = email.Context.Resources.GetDrawable(Android.Resource.Drawable.StatNotifyError);
			var emailText = email.Text;
			var passwordText = password.Text;
			if (emailText == null || emailText == String.Empty) {
				email.SetError(requiredFieldErrorMessage, icon);
				focus = email;
				return false;
			}
			Regex emailRegex = new Regex(@"^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)$");
			if (!emailRegex.IsMatch(emailText)) {
				email.SetError(incorrectEmailErrorMessage, icon);
				focus = email;
				return false;
			}
			else if (passwordText == null || passwordText == String.Empty) {
				password.SetError(requiredFieldErrorMessage, icon);
				focus = password;
				return false;
			}
			Regex passwordRegex = new Regex(@"\d+");
			if (passwordText.Length < 6 || (passwordText.Length > 6 && !passwordRegex.IsMatch(passwordText))) {
				password.SetError(incorrectPasswordErrorMessage, icon);
				focus = password;
				return false;
			}

			return true;
		}
开发者ID:MarcinSzyszka,项目名称:MobileSecondHand,代码行数:29,代码来源:FormValidator.cs


示例8: OnCreateView

		public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			Dialog.SetTitle (GetString (Resource.String.sign_in));
			var v = inflater.Inflate (Resource.Layout.fingerprint_dialog_container, container, false);
			mCancelButton = (Button)v.FindViewById (Resource.Id.cancel_button);
			mCancelButton.Click += (object sender, EventArgs e) => Dismiss ();

			mSecondDialogButton = (Button)v.FindViewById (Resource.Id.second_dialog_button);
			mSecondDialogButton.Click += (object sender, EventArgs e) => {
				if (mStage == Stage.Fingerprint) {
					GoToBackup ();
				} else {
					VerifyPassword ();
				}
			};

			mFingerprintContent = v.FindViewById (Resource.Id.fingerprint_container);
			mBackupContent = v.FindViewById (Resource.Id.backup_container);
			mPassword = v.FindViewById<EditText> (Resource.Id.password);
			mPassword.SetOnEditorActionListener (this);
			mPasswordDescriptionTextView = v.FindViewById<TextView> (Resource.Id.password_description);
			mUseFingerprintFutureCheckBox = v.FindViewById<CheckBox> (Resource.Id.use_fingerprint_in_future_check);
			mNewFingerprintEnrolledTextView = v.FindViewById<TextView> (Resource.Id.new_fingerprint_enrolled_description);
			mFingerprintUiHelper = mFingerprintUiHelperBuilder.Build (
				(ImageView)v.FindViewById (Resource.Id.fingerprint_icon),
				(TextView)v.FindViewById (Resource.Id.fingerprint_status), this);
			UpdateStage ();

			// If fingerprint authentication is not available, switch immediately to the backup
			// (password) screen.
			if (!mFingerprintUiHelper.IsFingerprintAuthAvailable)
				GoToBackup ();

			return v;
		}
开发者ID:nick30935n,项目名称:monodroid-samples,代码行数:35,代码来源:FingerprintAuthenticationDialogFragment.cs


示例9: OnCreate

        protected override async void OnCreate (Bundle bundle)
        {
            base.OnCreate (bundle);

            // Set our view from the "main" layout resource
            SetContentView (Resource.Layout.Activity_To_Do);

            CurrentPlatform.Init ();

            // await InitLocalStoreAsync();
            //await InitLocalStoreAsync();

            // Get the Mobile Service sync table instance to use
            var beaconTable = client.GetSyncTable <Beacon> ();

            textNewToDo = FindViewById<EditText> (Resource.Id.textNewToDo);

            // Create an adapter to bind the items with the view
            adapter = new Adapters.BeaconAdapter(this, Resource.Layout.Row_List_To_Do);
            var listViewBeacon = FindViewById<ListView> (Resource.Id.listViewToDo);
            listViewBeacon.Adapter = adapter;

            // Load the items from the Mobile Service
            OnRefreshItemsSelected ();
        }
开发者ID:FishSaidNo,项目名称:IAB330-CaAPA,代码行数:25,代码来源:BeaconActivity.cs


示例10: InitView

		private void InitView()
		{
			//设置标题栏
			var img_header_back = FindViewById<ImageView> (Resource.Id.img_header_back);
			img_header_back.Click += (sender, e) => 
			{
				this.Finish();
				OverridePendingTransition(Android.Resource.Animation.SlideInLeft,Android.Resource.Animation.SlideOutRight);
			};
			var tv_back = FindViewById<TextView> (Resource.Id.tv_back);
			tv_back.Text = "返回";
			var tv_desc = FindViewById<TextView> (Resource.Id.tv_desc);
			tv_desc.Text = "银行卡信息";

			edit_cardOwnerName = FindViewById<EditText> (Resource.Id.edit_cardOwnerName);
			edit_IdCardNo = FindViewById<EditText> (Resource.Id.edit_IdCardNo);
			edit_bankopenloc = FindViewById<EditText> (Resource.Id.edit_bankopenloc);
			edit_bankbranch = FindViewById<EditText> (Resource.Id.edit_bankbranch);
			edit_bankCardNo = FindViewById<EditText> (Resource.Id.edit_bankCardNo);
			edit_prePhoneNo = FindViewById<EditText> (Resource.Id.edit_prePhoneNo);
			edit_Code = FindViewById<EditText> (Resource.Id.edit_Code);
			img_choosebank = FindViewById<ImageView> (Resource.Id.img_choosebank);

			tv_SendCodeStatusShow = FindViewById<TextView> (Resource.Id.tv_SendCodeStatusShow);

			cb_defaut_bank = FindViewById<CheckBox> (Resource.Id.cb_defaut_bank);
			btn_Send = FindViewById<Button> (Resource.Id.btn_Send);
			btn_Add = FindViewById<Button> (Resource.Id.btn_Add);

			//选择银行卡
			img_choosebank.Click += (sender, e) => 
			{
				var intent = new Intent(this,typeof(ChooseBankTypeActivity));
				var requestCode = 0;  
				StartActivityForResult(intent,requestCode);
			};
			//安全码验证
			edit_Code.TextChanged += (sender, e) => 
			{
				if(edit_Code.Text.Length>0)
					btn_Add.Enabled = true;
				else
					btn_Add.Enabled =false;
			};
			//初始化计时器,启动
			mc = new MyCount(this,60000,1000);
			//发送验证码
			btn_Send.Click += (sender, e) => 
			{
				tv_SendCodeStatusShow.Visibility = ViewStates.Invisible;
				btn_Send.Enabled = false;
				SendCode();
			};

			//添加银行卡信息
			btn_Add.Click += (sender, e) => 
			{
				AddBank();
			};
		}
开发者ID:lq-ever,项目名称:CommunityCenter,代码行数:60,代码来源:AddBankStepTwoActivity.cs


示例11: KundeListviewSearchDialog

 public KundeListviewSearchDialog(MainActivity activity, string title, EditText edTarget,StateFragmentArtikelPreisInfo state): base(activity)
 {
     _activity = activity;  
     _title = title;
     _edTarget = edTarget;
     _state = state;
 }
开发者ID:MbProg,项目名称:TestApolloAndroid,代码行数:7,代码来源:ListviewSearchDialog.cs


示例12: OnCreate

        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate (savedInstanceState);

            SetContentView (Resource.Layout.Login);

            // Services
            LoginService = new Service.LoginService ();

            // UI elements
            UsernameInput = FindViewById<EditText> (Resource.Id.loginInputUsername);
            PasswordInput = FindViewById<EditText> (Resource.Id.loginInputPassword);
            LoginButton = FindViewById<Button> (Resource.Id.loginBtn);

            // Login button click event
            LoginButton.Click += OnLoginButtonClick;

            // GPS Button test
            Button gpsButton = FindViewById<Button> (Resource.Id.gpsBtn);
            gpsButton.Click += (object sender, System.EventArgs e) => {
                LocationManager location = GetSystemService(LocationService) as LocationManager;
                Criteria gpsCriteria = new Criteria() {
                    Accuracy = Accuracy.Coarse,
                    AltitudeRequired = false,
                    BearingRequired = false,
                    CostAllowed = true,
                    PowerRequirement = Power.NoRequirement,
                    SpeedRequired = false,
                };

                Location currentLocation = location.GetLastKnownLocation(location.GetBestProvider(gpsCriteria, false));
            };
        }
开发者ID:martindeveloper,项目名称:XamarinAndroidCourseFAI,代码行数:33,代码来源:LoginActivity.cs


示例13: OnCreate

        /// <summary>
        /// Called when [create].
        /// </summary>
        /// <param name="bundle">The bundle.</param>
        protected override void OnCreate(Bundle bundle)
        {
            try
            {
                base.OnCreate(bundle);
                this.RequestWindowFeature(WindowFeatures.NoTitle);
                SetContentView(Resource.Layout.Login);
                var loginButton = FindViewById<Button>(Resource.Id.btnLogin);
                loginButton.Click += loginButton_Click;
                txtUserName = FindViewById<EditText>(Resource.Id.txtUserName);
                txtPassword = FindViewById<EditText>(Resource.Id.txtPassword);
                chkRememberMe = FindViewById<CheckBox>(Resource.Id.chkRememberMe);
                ResetControl();
                txtUserName.Text = DecurtisDomain;
                txtUserName.SetSelection(txtUserName.Text.Length);
                if (ApplicationData.User != null && !string.IsNullOrEmpty(ApplicationData.User.LoginName))
                {
                    txtUserName.Text = ApplicationData.User.LoginName;
                }
            }
            catch (Exception e)
            {
                AlertMessage(GetString(Resource.String.Error), e.Message.ToString());
            }

            // Create your application here
        }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:31,代码来源:LoginActivity.cs


示例14: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);

            m_dataManager = DataManager.GetDataManager();

            m_connectionButton = FindViewById<Button>(Resource.Id.connectButton);
            m_login = FindViewById<EditText>(Resource.Id.loginField);
            m_password = FindViewById<EditText>(Resource.Id.passwordField);
            m_checkBox = FindViewById<CheckBox>(Resource.Id.rememberPass);

            // Store user data
            if (m_dataManager.RetreiveData<bool>("loginCheckBox") == true)
            {
                m_login.Text = m_dataManager.RetreiveData<string>("login");
                m_password.Text = m_dataManager.RetreiveData<string>("password");
                m_checkBox.Checked = m_dataManager.RetreiveData<bool>("loginCheckBox");
            }

            StartService(new Intent(this, typeof(NetworkService)));
            BindService(new Intent(this, typeof(NetworkService)), this, Bind.AutoCreate);

            m_connectionButton.Click += delegate {
                m_netwokService.SetLoginInfo(m_login.Text, m_password.Text);
                m_netwokService.LoginEvent += OnLogin;
                m_netwokService.Login();
            };
        }
开发者ID:Naphtaline,项目名称:EpiMessenger,代码行数:29,代码来源:MainActivity.cs


示例15: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource

            SetContentView(Resource.Layout.Main);

            setupParent(FindViewById<LinearLayout>(Resource.Id.mainLayout));
            listViewGoodsMain = FindViewById<ListView>(Resource.Id.listViewGoodsMain);

            goodsItemsList = new List<GoodsItem>();
            goodsItemsList.Add(new GoodsItem() { Id = 1, Quantity = 1, Name = "Пельмешки"});
            goodsItemsList.Add(new GoodsItem() { Id = 2, Quantity = 2, Name = "Сосисоны" });

            myGoodsItemsAdapter = new GoodsItemsAdapter(this, goodsItemsList);
            listViewGoodsMain.Adapter = myGoodsItemsAdapter;

            var emptyText = FindViewById<TextView>(Resource.Id.textViewGoodsListEmpty);
            listViewGoodsMain.EmptyView = emptyText;

            editTextNewProduct = FindViewById<EditText>(Resource.Id.EditTextNewProduct);
            editTextNewProduct.EditorAction += editTextNewProduct_EditorAction;
            editTextNewProduct.Click += editTextNewProduct_Click;

            checkBoxRed = FindViewById<CheckBox>(Resource.Id.checkBoxRed);
            checkBoxRed.Click += checkBoxRed_Click;
        }
开发者ID:TkachenkoRoman,项目名称:GoodsListApp,代码行数:28,代码来源:MainActivity.cs


示例16: OnCreate

		protected async override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);
			
			String beaconID = Intent.GetStringExtra("BeaconID");
			if (!String.IsNullOrWhiteSpace(beaconID)) {
				beacon = await BeaconManager.GetBeaconAsync(beaconID);
			} else {
				currentGenerateGuid = Guid.NewGuid ();
				beacon.ID = currentGenerateGuid.ToString ();
			}
			
			// set our layout to be the home screen
			SetContentView(Resource.Layout.BeaconDetails);
			nameTextEdit = FindViewById<EditText>(Resource.Id.NameText);
			notesTextEdit = FindViewById<EditText>(Resource.Id.NotesText);
			saveButton = FindViewById<Button>(Resource.Id.SaveButton);
			
			// find all our controls
			cancelDeleteButton = FindViewById<Button>(Resource.Id.CancelDeleteButton);
			
			// set the cancel delete based on whether or not it's an existing task
			cancelDeleteButton.Text = (currentGenerateGuid != null ? "Cancel" : "Delete");

			nameTextEdit.Text = beacon.Name; 
			notesTextEdit.Text = beacon.Notes;

			// button clicks 
			cancelDeleteButton.Click += async (sender, e) => { await CancelDelete(); };
			saveButton.Click += async (sender, e) => { await Save(); };
		}
开发者ID:nagarajas,项目名称:neubeaconandroid,代码行数:31,代码来源:BeaconDetailsScreen.cs


示例17: Display

		public void Display (string body, string title, GoalsAvailable availableGoal, string cancelButtonTitle, string acceptButtonTitle = "", Action<GoalsAvailable, int> action = null)
		{
			EditText goalTextBox = new EditText (Forms.Context);
			AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder (Forms.Context);
			alertDialogBuilder.SetTitle (title);
			alertDialogBuilder.SetMessage (body);
			alertDialogBuilder.SetView (goalTextBox);

			goalTextBox.InputType = Android.Text.InputTypes.NumberFlagSigned;

			var inputFilter = new Android.Text.InputFilterLengthFilter (7);
			var filters = new Android.Text.IInputFilter[1];

			filters [0] = inputFilter;

			goalTextBox.SetFilters (filters);
			goalTextBox.InputType = Android.Text.InputTypes.ClassNumber;

			alertDialogBuilder.SetPositiveButton ("OK", (senderAlert, args) => {
				if(action != null)
				{
					int goalValue;
					int.TryParse(goalTextBox.Text, out goalValue);
					action.Invoke(availableGoal, goalValue);
				}

			} );
			alertDialogBuilder.SetNeutralButton ("CANCEL", (senderAlert, args) => {

			} );

			alertDialogBuilder.Show ();

		}
开发者ID:MobileFit,项目名称:CoachV2,代码行数:34,代码来源:InputGoalDialogService.cs


示例18: OnOptionsItemSelected

        public override bool OnOptionsItemSelected(IMenuItem item)
        {
            switch (item.ItemId)
            {
                case Resource.Id.actionNew:
                    string default_game_name = "Game";
                    AlertDialog.Builder alert1 = new AlertDialog.Builder(this.Activity);
                    EditText input = new EditText(this.Activity);
                    input.Text = default_game_name;
                    alert1.SetTitle("Game Name");
                    alert1.SetView(input);
                    alert1.SetPositiveButton("OK", delegate { AddGame(input.Text); });
                    alert1.SetNegativeButton("Cancel", (s, e) => { });
                    alert1.Show();
                    _adapter.NotifyDataSetChanged();
                    return true;

                case Resource.Id.actionRefresh:
                    GameData.Service.RefreshCache();
                    _adapter.NotifyDataSetChanged();
                    return true;

                default:
                    return base.OnOptionsItemSelected(item);
            }
        }
开发者ID:quanb,项目名称:SimpleScoreBoard,代码行数:26,代码来源:GamesFragment.cs


示例19: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);

            txtAuditDate = FindViewById<EditText>(Resource.Id.txtAuditDate);
            txtAuditor = FindViewById<EditText>(Resource.Id.txtAuditor);
            txtManu= FindViewById<EditText>(Resource.Id.txtManu);
            txtModel = FindViewById<EditText>(Resource.Id.txtModel);
            txtComputerName = FindViewById<EditText>(Resource.Id.txtCompName);
            txtOperSys = FindViewById<EditText>(Resource.Id.txtOS);
            txtOperSysArch = FindViewById<EditText>(Resource.Id.txtOSArch);
            txtServicePack = FindViewById<EditText>(Resource.Id.txtServicePack);
            txtSerialNo = FindViewById<EditText>(Resource.Id.txtSerialNo);
            txtProcessorName = FindViewById<EditText>(Resource.Id.txtProcessName);
            txtProcessorsAmt = FindViewById<EditText>(Resource.Id.txtProcessorsNo);
            txtRamAmt = FindViewById<EditText>(Resource.Id.txtRam);
            txtHardDriveSize = FindViewById<EditText>(Resource.Id.txtHardDriveSize);
            txtAvailSpace = FindViewById<EditText>(Resource.Id.txtAvailSpace);
            txtComments = FindViewById<EditText>(Resource.Id.txtComments);

            btnSave = FindViewById<Button>(Resource.Id.btnUpdate);
            btnViewMore = FindViewById<Button>(Resource.Id.btnViewMore);
            btnScan = FindViewById<Button>(Resource.Id.btnScan);

            btnViewMore.Click += BtnViewMore_Click;
            btnScan.Click += BtnScan_Click;
            btnSave.Click += BtnSave_Click;
        }
开发者ID:CaptainLDawg,项目名称:PC-Audit-Project,代码行数:29,代码来源:MainActivity.cs


示例20: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            etNum1 = FindViewById<EditText>(Resource.Id.etNum1);
            etNum2 = FindViewById<EditText>(Resource.Id.etNum2);
            btnAdd = (Button)FindViewById(Resource.Id.btnAdd);
            btnSub = (Button)FindViewById(Resource.Id.btnSub);
            btnMult = (Button)FindViewById(Resource.Id.btnMult);
            btnDiv = (Button)FindViewById(Resource.Id.btnDiv);
            tvResult = (TextView)FindViewById(Resource.Id.tvResult);

            btnAdd.Click += btnOper_Click;
            btnSub.Click += btnOper_Click;
            btnMult.Click += btnOper_Click;
            btnDiv.Click += btnOper_Click;

            var sPref = GetSharedPreferences(PreferencesActivity.XAPPP001PREF_NAME, FileCreationMode.Private);
            String num1Val = sPref.GetString(PreferencesActivity.PREFKEY_CALCULATOR_NUM1_VALUE, "0");
            String num2Val = sPref.GetString(PreferencesActivity.PREFKEY_CALCULATOR_NUM2_VALUE, "0");

            etNum1.Text = num1Val;
            etNum2.Text = num2Val;

            if (bundle != null)
            {
                etNum1.Text = bundle.GetString(Resource.Id.etNum1.ToString(), num1Val);
                etNum2.Text = bundle.GetString(Resource.Id.etNum2.ToString(), num2Val);
                tvResult.Text = bundle.GetString(Resource.Id.tvResult.ToString(), String.Empty);
                Log.Debug(GetType().FullName, "Recovered instance state");
            }
        }
开发者ID:CBSAdvisor,项目名称:cbs-quantum,代码行数:35,代码来源:MainActivity.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# EditType类代码示例发布时间:2022-05-24
下一篇:
C# EditMode类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap