mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 15:15:34 +03:00
Focus input when cell tapped.
This commit is contained in:
parent
2d5d9fd113
commit
2712ae10e6
5 changed files with 21 additions and 12 deletions
|
@ -25,9 +25,16 @@ namespace Bit.App.Controls
|
||||||
|
|
||||||
stackLayout.Children.Add(Editor);
|
stackLayout.Children.Add(Editor);
|
||||||
|
|
||||||
|
Tapped += FormEditorCell_Tapped;
|
||||||
|
|
||||||
View = stackLayout;
|
View = stackLayout;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ExtendedEditor Editor { get; private set; }
|
public ExtendedEditor Editor { get; private set; }
|
||||||
|
|
||||||
|
private void FormEditorCell_Tapped(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Editor.Focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,6 +85,8 @@ namespace Bit.App.Controls
|
||||||
formStackLayout.Children.Add(Entry);
|
formStackLayout.Children.Add(Entry);
|
||||||
imageStackLayout.Children.Add(formStackLayout);
|
imageStackLayout.Children.Add(formStackLayout);
|
||||||
|
|
||||||
|
Tapped += FormEntryCell_Tapped;
|
||||||
|
|
||||||
View = imageStackLayout;
|
View = imageStackLayout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,5 +97,10 @@ namespace Bit.App.Controls
|
||||||
{
|
{
|
||||||
Entry.Focus();
|
Entry.Focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void FormEntryCell_Tapped(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Entry.Focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,10 +36,17 @@ namespace Bit.App.Controls
|
||||||
stackLayout.Children.Add(Label);
|
stackLayout.Children.Add(Label);
|
||||||
stackLayout.Children.Add(Picker);
|
stackLayout.Children.Add(Picker);
|
||||||
|
|
||||||
|
Tapped += FormPickerCell_Tapped;
|
||||||
|
|
||||||
View = stackLayout;
|
View = stackLayout;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Label Label { get; private set; }
|
public Label Label { get; private set; }
|
||||||
public ExtendedPicker Picker { get; private set; }
|
public ExtendedPicker Picker { get; private set; }
|
||||||
|
|
||||||
|
private void FormPickerCell_Tapped(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Picker.Focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,6 @@ namespace Bit.App.Pages
|
||||||
|
|
||||||
var nameCell = new FormEntryCell(AppResources.Name);
|
var nameCell = new FormEntryCell(AppResources.Name);
|
||||||
nameCell.Entry.Text = folder.Name.Decrypt();
|
nameCell.Entry.Text = folder.Name.Decrypt();
|
||||||
nameCell.Tapped += NameCell_Tapped;
|
|
||||||
|
|
||||||
var deleteCell = new ExtendedTextCell { Text = AppResources.Delete, TextColor = Color.Red };
|
var deleteCell = new ExtendedTextCell { Text = AppResources.Delete, TextColor = Color.Red };
|
||||||
deleteCell.Tapped += DeleteCell_Tapped;
|
deleteCell.Tapped += DeleteCell_Tapped;
|
||||||
|
@ -46,7 +45,6 @@ namespace Bit.App.Pages
|
||||||
{
|
{
|
||||||
Intent = TableIntent.Settings,
|
Intent = TableIntent.Settings,
|
||||||
EnableScrolling = false,
|
EnableScrolling = false,
|
||||||
EnableSelection = true,
|
|
||||||
HasUnevenRows = true,
|
HasUnevenRows = true,
|
||||||
VerticalOptions = LayoutOptions.Start,
|
VerticalOptions = LayoutOptions.Start,
|
||||||
Root = new TableRoot
|
Root = new TableRoot
|
||||||
|
@ -107,15 +105,6 @@ namespace Bit.App.Pages
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void NameCell_Tapped(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
var cell = sender as FormEntryCell;
|
|
||||||
if(cell != null)
|
|
||||||
{
|
|
||||||
cell.Entry.Focus();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private async void DeleteCell_Tapped(object sender, EventArgs e)
|
private async void DeleteCell_Tapped(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
// TODO: Validate the delete operation. ex. Cannot delete a folder that has sites in it?
|
// TODO: Validate the delete operation. ex. Cannot delete a folder that has sites in it?
|
||||||
|
|
|
@ -83,7 +83,6 @@ namespace Bit.App.Pages
|
||||||
Intent = TableIntent.Settings,
|
Intent = TableIntent.Settings,
|
||||||
EnableScrolling = true,
|
EnableScrolling = true,
|
||||||
HasUnevenRows = true,
|
HasUnevenRows = true,
|
||||||
EnableSelection = false,
|
|
||||||
Root = new TableRoot
|
Root = new TableRoot
|
||||||
{
|
{
|
||||||
new TableSection("Site Information")
|
new TableSection("Site Information")
|
||||||
|
|
Loading…
Reference in a new issue