Anji V

Anji V

  • NA
  • 98
  • 28.8k

entry field unfocused method not working properly in android

Nov 2 2018 1:15 PM
Entry field unfocused method not working properly in android versions oreo and pie using xamarin forms.
I have two entry fields(ent1,ent2)  with have unfocused events, both are using for updatable . android versions oreo and pie
 
<controls:RoundedEntry x:Name="Entry1" BorderColor="LightGray" Keyboard="Numeric"
ReturnCommandParameter="{Binding EmployeeId}" Unfocused="Entry1_Unfocused"
IsEnabled="{Binding isEntry1Editable}" WidthRequest="30"
VerticalOptions="CenterAndExpand" FontSize="Medium" Text="{Binding Entry1text}">
<controls:RoundedEntry x:Name="Entry2" BorderColor="LightGray" Keyboard="Numeric"
ReturnCommandParameter="{Binding ManagerId}" Unfocused="Entry2_Unfocused"
IsEnabled="{Binding isEntry2Editable}" WidthRequest="30"
VerticalOptions="CenterAndExpand" FontSize="Medium" Text="{Binding Entry2text}">
private void Entry1_Unfocused(object sender, FocusEventArgs e)
{
Entry entry = (Entry)sender;
EmployeeId= Convert.ToInt32(entry.ReturnCommandParameter),
var FirstItemVal = Convert.ToInt64(entry.Text)
UpdateFirstItem(FirstItemVal,EmployeeId);
}
private void Entry2_Unfocused(object sender, FocusEventArgs e)
{
Entry entry = (Entry)sender;
ManagerId= Convert.ToInt32(entry.ReturnCommandParameter),
var SecoendItemVal = Convert.ToInt64(entry.Text)
UpdateFirstItem(SecoendItemVal,ManagerId);
}
  
when using android versions Oreo 8.1 and Pie 9.0 is not working.
Example:-entry1 is disable mode  and enter value into the entry2 automatically the focus will hit on entry1 and it is enable mode.
 
Thhanks in Advance.