protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.Notespage); title = FindViewById <Android.Support.Design.Widget.TextInputEditText>(Resource.Id.textInputEditText1); notes = FindViewById <Android.Support.Design.Widget.TextInputEditText>(Resource.Id.textInputEditText1); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.Login); Window.SetSoftInputMode(SoftInput.StateAlwaysHidden); login_txt = FindViewById <Android.Support.Design.Widget.TextInputEditText>(Resource.Id.login_txt); password_txt = FindViewById <Android.Support.Design.Widget.TextInputEditText>(Resource.Id.password_txt); login_btn = FindViewById <Button>(Resource.Id.login_btn); register_txt = FindViewById <TextView>(Resource.Id.register_txt); register_txt.Click += Register_OnClick; login_btn.Click += Login_OnClick; }
private void AddPhp(object sender, View.FocusChangeEventArgs e) { Android.Support.Design.Widget.TextInputEditText sent = (Android.Support.Design.Widget.TextInputEditText)sender; string php = "Php "; if (!sent.HasFocus) { if (sent.Text.Length > 0) { sent.Text = php + sent.Text; } } else { sent.Text = sent.Text.Replace("Php ", ""); } }
void GetPlaceFromPicker(Intent data) { TextView placePickedAddress = FindViewById <TextView>(Resource.Id.textViewPickAPlaceAddress); TextView placePickedName = FindViewById <TextView>(Resource.Id.textViewPickAPlaceName); _placePickedMessage = FindViewById <Android.Support.Design.Widget.TextInputEditText>(Resource.Id.textInputEditTextInvitationMessage); var placePicked = PlacePicker.GetPlace(this, data); if (placePicked != null) { placePickedName.Text = placePicked.NameFormatted.ToString(); placePickedAddress.Text = placePicked.AddressFormatted.ToString(); _message = "Hi, let's meet at" + placePicked.NameFormatted + " , " + placePicked.AddressFormatted.ToString() + ". Location calculated and message generated using Meet."; } _placePickedMessage.Text = _message; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.Employer_Add_Transaction); Window.SetSoftInputMode(SoftInput.StateAlwaysHidden); expertise_spin = FindViewById <Spinner>(Resource.Id.expertise_spin); var adapter = ArrayAdapter.CreateFromResource(this, Resource.Array.expertise_array, Resource.Drawable.spinner_item); expertise_spin.Adapter = adapter; date_pick = FindViewById <Button>(Resource.Id.date_pick); date_pick.Click += DateSelect_OnClick; time_pick = FindViewById <Button>(Resource.Id.time_pick); time_pick.Click += TimeSelect_OnClick; send_request_btn = FindViewById <Button>(Resource.Id.send_request_btn); send_request_btn.Click += delegate { var intent = new Intent(this, typeof(EmployerHome)); StartActivity(intent); this.Finish(); Toast.MakeText(this, "A new transaction was successully sent!", ToastLength.Short).Show(); }; zipcode_edit = FindViewById <Android.Support.Design.Widget.TextInputEditText>(Resource.Id.zipcode_edit); muni_edit = FindViewById <Android.Support.Design.Widget.TextInputEditText>(Resource.Id.muni_edit); city_province_edit = FindViewById <Android.Support.Design.Widget.TextInputEditText>(Resource.Id.city_province_edit); perm_validate_btn = FindViewById <Button>(Resource.Id.perm_validate_btn); perm_validate_btn.Click += PermValidate; from_edit = FindViewById <Android.Support.Design.Widget.TextInputEditText>(Resource.Id.from_edit); from_edit.FocusChange += AddPhp; to_edit = FindViewById <Android.Support.Design.Widget.TextInputEditText>(Resource.Id.to_edit); to_edit.FocusChange += AddPhp; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); FrameLayout SendPointsLayout = new FrameLayout(this); SetContentView(SendPointsLayout); base.CombineWith(SendPointsLayout, Resource.Layout.SendPoints, ActivityIs.Home); SendPointsButton = FindViewById <Button>(Resource.Id.SPSendButton); ToolBar = FindViewById <SupportToolBar>(Resource.Id.toolbar); userNameToDistribute = FindViewById <SupportEditText>(Resource.Id.SPSelectPerson); NumberOfPoints = FindViewById <SupportEditText>(Resource.Id.SPNumOfPointsEditText); CanDistributePoints = FindViewById <TextView>(Resource.Id.SPCDpoints); Notes = FindViewById <SupportEditText>(Resource.Id.SPNotesEditText); SendPointsButton.Enabled = false; InitializeProfile(); if (Android.OS.Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop) { SendPointsButton.SetBackgroundResource(Resource.Color.button_ripple); } SetSupportActionBar(ToolBar); SupportActionBar.Title = "Send Points"; SupportActionBar.SetHomeButtonEnabled(true); SupportActionBar.SetDisplayHomeAsUpEnabled(true); SendPointsButton.Click += SendPointsButton_Clicked; userNameToDistribute.Click += SelectPerson_Clicked; NumberOfPoints.FocusChange += NumberOfPoints_FocusChanged; SendPointsLayout.Touch += Layout_Touched; }