mirror of
https://github.com/bitwarden/android.git
synced 2024-12-28 03:48:31 +03:00
PM-3349 Fix for TabGestureRecognizer not working inside the StackLayout area of IconLabelButton
This commit is contained in:
parent
c6309173ba
commit
840f24dbe5
3 changed files with 13 additions and 8 deletions
|
@ -11,13 +11,13 @@
|
|||
<RoundRectangle CornerRadius="{Binding CornerRadius, Source={x:Reference _iconLabelButton}}" />
|
||||
</Border.StrokeShape>
|
||||
<Grid>
|
||||
<Grid.GestureRecognizers>
|
||||
<TapGestureRecognizer Tapped="TapGestureRecognizer_OnTapped" Command="{Binding ButtonCommand, Source={x:Reference _iconLabelButton}}" />
|
||||
</Grid.GestureRecognizers>
|
||||
<StackLayout
|
||||
Spacing="6"
|
||||
Orientation="Horizontal"
|
||||
HorizontalOptions="Center">
|
||||
<StackLayout.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding ButtonCommand, Source={x:Reference _iconLabelButton}}" />
|
||||
</StackLayout.GestureRecognizers>
|
||||
<controls:IconLabel
|
||||
VerticalOptions="Center"
|
||||
HorizontalTextAlignment="Center"
|
||||
|
|
|
@ -25,6 +25,8 @@ namespace Bit.App.Controls
|
|||
public static readonly BindableProperty CornerRadiusProperty = BindableProperty.Create(
|
||||
nameof(CornerRadius), typeof(CornerRadius), typeof(IconLabelButton));
|
||||
|
||||
public event EventHandler<TappedEventArgs> Tapped;
|
||||
|
||||
public IconLabelButton()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
@ -71,6 +73,11 @@ namespace Bit.App.Controls
|
|||
get { return (CornerRadius)GetValue(CornerRadiusProperty); }
|
||||
set { SetValue(CornerRadiusProperty, value); }
|
||||
}
|
||||
|
||||
private void TapGestureRecognizer_OnTapped(object sender, TappedEventArgs e)
|
||||
{
|
||||
Tapped?.Invoke(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -128,11 +128,9 @@
|
|||
VerticalOptions="CenterAndExpand"
|
||||
Icon="{Binding Source={x:Static core:BitwardenIcons.Suitcase}}"
|
||||
Label="{u:I18n LogInSso}"
|
||||
AutomationId="LogInWithSsoButton">
|
||||
<controls:IconLabelButton.GestureRecognizers>
|
||||
<TapGestureRecognizer Tapped="LogInSSO_Clicked" />
|
||||
</controls:IconLabelButton.GestureRecognizers>
|
||||
</controls:IconLabelButton>
|
||||
AutomationId="LogInWithSsoButton"
|
||||
Tapped="LogInSSO_Clicked"
|
||||
/>
|
||||
<Label
|
||||
Text="{Binding LoggingInAsText}"
|
||||
StyleClass="text-sm"
|
||||
|
|
Loading…
Reference in a new issue