本文整理汇总了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));
}
示例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);
}
}
示例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;
};
}
示例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;
}
示例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;
}
示例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);
}
};
}
示例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;
}
示例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;
}
示例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 ();
}
示例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();
};
}
示例11: KundeListviewSearchDialog
public KundeListviewSearchDialog(MainActivity activity, string title, EditText edTarget,StateFragmentArtikelPreisInfo state): base(activity)
{
_activity = activity;
_title = title;
_edTarget = edTarget;
_state = state;
}
示例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));
};
}
示例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
}
示例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();
};
}
示例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;
}