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


C# EditText类代码示例

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


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


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