mirror of
https://github.com/bitwarden/android.git
synced 2024-12-28 20:08:43 +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}}" />
|
<RoundRectangle CornerRadius="{Binding CornerRadius, Source={x:Reference _iconLabelButton}}" />
|
||||||
</Border.StrokeShape>
|
</Border.StrokeShape>
|
||||||
<Grid>
|
<Grid>
|
||||||
|
<Grid.GestureRecognizers>
|
||||||
|
<TapGestureRecognizer Tapped="TapGestureRecognizer_OnTapped" Command="{Binding ButtonCommand, Source={x:Reference _iconLabelButton}}" />
|
||||||
|
</Grid.GestureRecognizers>
|
||||||
<StackLayout
|
<StackLayout
|
||||||
Spacing="6"
|
Spacing="6"
|
||||||
Orientation="Horizontal"
|
Orientation="Horizontal"
|
||||||
HorizontalOptions="Center">
|
HorizontalOptions="Center">
|
||||||
<StackLayout.GestureRecognizers>
|
|
||||||
<TapGestureRecognizer Command="{Binding ButtonCommand, Source={x:Reference _iconLabelButton}}" />
|
|
||||||
</StackLayout.GestureRecognizers>
|
|
||||||
<controls:IconLabel
|
<controls:IconLabel
|
||||||
VerticalOptions="Center"
|
VerticalOptions="Center"
|
||||||
HorizontalTextAlignment="Center"
|
HorizontalTextAlignment="Center"
|
||||||
|
|
|
@ -25,6 +25,8 @@ namespace Bit.App.Controls
|
||||||
public static readonly BindableProperty CornerRadiusProperty = BindableProperty.Create(
|
public static readonly BindableProperty CornerRadiusProperty = BindableProperty.Create(
|
||||||
nameof(CornerRadius), typeof(CornerRadius), typeof(IconLabelButton));
|
nameof(CornerRadius), typeof(CornerRadius), typeof(IconLabelButton));
|
||||||
|
|
||||||
|
public event EventHandler<TappedEventArgs> Tapped;
|
||||||
|
|
||||||
public IconLabelButton()
|
public IconLabelButton()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
@ -71,6 +73,11 @@ namespace Bit.App.Controls
|
||||||
get { return (CornerRadius)GetValue(CornerRadiusProperty); }
|
get { return (CornerRadius)GetValue(CornerRadiusProperty); }
|
||||||
set { SetValue(CornerRadiusProperty, value); }
|
set { SetValue(CornerRadiusProperty, value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void TapGestureRecognizer_OnTapped(object sender, TappedEventArgs e)
|
||||||
|
{
|
||||||
|
Tapped?.Invoke(sender, e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -128,11 +128,9 @@
|
||||||
VerticalOptions="CenterAndExpand"
|
VerticalOptions="CenterAndExpand"
|
||||||
Icon="{Binding Source={x:Static core:BitwardenIcons.Suitcase}}"
|
Icon="{Binding Source={x:Static core:BitwardenIcons.Suitcase}}"
|
||||||
Label="{u:I18n LogInSso}"
|
Label="{u:I18n LogInSso}"
|
||||||
AutomationId="LogInWithSsoButton">
|
AutomationId="LogInWithSsoButton"
|
||||||
<controls:IconLabelButton.GestureRecognizers>
|
Tapped="LogInSSO_Clicked"
|
||||||
<TapGestureRecognizer Tapped="LogInSSO_Clicked" />
|
/>
|
||||||
</controls:IconLabelButton.GestureRecognizers>
|
|
||||||
</controls:IconLabelButton>
|
|
||||||
<Label
|
<Label
|
||||||
Text="{Binding LoggingInAsText}"
|
Text="{Binding LoggingInAsText}"
|
||||||
StyleClass="text-sm"
|
StyleClass="text-sm"
|
||||||
|
|
Loading…
Reference in a new issue