Skip to content
This repository has been archived by the owner on Mar 15, 2023. It is now read-only.

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
aritchie committed Jan 13, 2015
1 parent 78849c5 commit 314f5b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 52 deletions.
47 changes: 3 additions & 44 deletions Acr.XamForms.UserDialogs.Droid/UserDialogService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,46 +62,6 @@ public override void Confirm(ConfirmConfig config) {
}


//public override void DateTimePrompt(DateTimePromptConfig config) {
// var date = DateTime.Now;
// switch (config.SelectionType) {

// case DateTimeSelectionType.DateTime: // TODO
// case DateTimeSelectionType.Date:
// var datePicker = new DatePickerDialog(Utils.GetActivityContext(), (sender, args) => {
// date = args.Date;
// }, 1900, 1, 1);
// //picker.CancelEvent
// datePicker.DismissEvent += (sender, args) => config.OnResult(new DateTimePromptResult(date));
// datePicker.SetTitle(config.Title);
// datePicker.Show();
// break;

// case DateTimeSelectionType.Time:
// var timePicker = new TimePickerDialog(Utils.GetActivityContext(), (sender, args) => {
// date = new DateTime(
// date.Year,
// date.Month,
// date.Day,
// args.HourOfDay,
// args.Minute,
// 0
// );
// }, 0, 0, false); // takes 24 hour arg
// timePicker.DismissEvent += (sender, args) => config.OnResult(new DateTimePromptResult(date));
// timePicker.SetTitle(config.Title);
// timePicker.Show();
// break;
// }
//}


//public override void DurationPrompt(DurationPromptConfig config) {
// // TODO
// throw new NotImplementedException();
//}


public override void Login(LoginConfig config) {
var context = Utils.GetActivityContext();
var txtUser = new EditText(context) {
Expand Down Expand Up @@ -146,11 +106,10 @@ public override void Prompt(PromptConfig config) {
var txt = new EditText(Utils.GetActivityContext()) {
Hint = config.Placeholder
};
if (config.IsSecure)
txt.SetMaxLines(1);
else {
txt.SetMaxLines(1);
if (config.IsSecure) {
txt.TransformationMethod = PasswordTransformationMethod.Instance;
txt.InputType = InputTypes.TextVariationPassword;
txt.InputType = InputTypes.ClassText | InputTypes.TextVariationPassword;
}
new AlertDialog
.Builder(Utils.GetActivityContext())
Expand Down
8 changes: 0 additions & 8 deletions Acr.XamForms.UserDialogs/PromptConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@ public PromptConfig() {
}


//public static PromptConfig Create(string message, Action<PromptResult> onResult) {
// return new PromptConfig {
// Message = message,
// OnResult = onResult
// };
//}


public PromptConfig SetTitle(string title) {
this.Title = title;
return this;
Expand Down

0 comments on commit 314f5b9

Please sign in to comment.