mirror of
https://github.com/bitwarden/mobile
synced 2026-01-08 11:33:31 +00:00
PM-3349 Fix for TabGestureRecognizer not working inside the StackLayout area of IconLabelButton
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user