diff --git a/src/Android/Properties/AndroidManifest.xml b/src/Android/Properties/AndroidManifest.xml index 6ccf42d66..c3c85f0e5 100644 --- a/src/Android/Properties/AndroidManifest.xml +++ b/src/Android/Properties/AndroidManifest.xml @@ -12,6 +12,7 @@ + diff --git a/src/Android/Renderers/ExtendedGridRenderer.cs b/src/Android/Renderers/ExtendedGridRenderer.cs index a46cbca52..f1a0b10f3 100644 --- a/src/Android/Renderers/ExtendedGridRenderer.cs +++ b/src/Android/Renderers/ExtendedGridRenderer.cs @@ -14,7 +14,7 @@ namespace Bit.Droid.Renderers protected override void OnElementChanged(ElementChangedEventArgs elementChangedEvent) { base.OnElementChanged(elementChangedEvent); - if (elementChangedEvent.NewElement != null) + if (elementChangedEvent.NewElement is ExtendedGrid extGrid && extGrid.ApplyRipple) { SetBackgroundResource(Resource.Drawable.list_item_bg); } diff --git a/src/App/Controls/ExtendedGrid.cs b/src/App/Controls/ExtendedGrid.cs index 77e072aef..441a8862f 100644 --- a/src/App/Controls/ExtendedGrid.cs +++ b/src/App/Controls/ExtendedGrid.cs @@ -4,5 +4,6 @@ namespace Bit.App.Controls { public class ExtendedGrid : Grid { + public bool ApplyRipple { get; set; } = true; } } diff --git a/src/App/Pages/Vault/GroupingsPage/GroupingsPage.xaml b/src/App/Pages/Vault/GroupingsPage/GroupingsPage.xaml index cf339ebf3..6b46ab330 100644 --- a/src/App/Pages/Vault/GroupingsPage/GroupingsPage.xaml +++ b/src/App/Pages/Vault/GroupingsPage/GroupingsPage.xaml @@ -53,41 +53,39 @@ WebsiteIconsEnabled="{Binding BindingContext.WebsiteIconsEnabled, Source={x:Reference _page}}" /> + - + - - - - - - - - - - - + + + + + + - + diff --git a/src/App/Pages/Vault/GroupingsPage/GroupingsPageViewModel.cs b/src/App/Pages/Vault/GroupingsPage/GroupingsPageViewModel.cs index 2e2dae205..22a4f457d 100644 --- a/src/App/Pages/Vault/GroupingsPage/GroupingsPageViewModel.cs +++ b/src/App/Pages/Vault/GroupingsPage/GroupingsPageViewModel.cs @@ -5,7 +5,6 @@ using System.Threading.Tasks; using Bit.App.Abstractions; using Bit.App.Controls; using Bit.App.Resources; -using Bit.App.Utilities; using Bit.App.Utilities.Helpers; using Bit.Core.Abstractions; using Bit.Core.Enums; @@ -645,6 +644,14 @@ namespace Bit.App.Pages if (listItem is GroupingsPageListItem groupPageListItem && groupPageListItem.Cipher?.Type == CipherType.Login) { await _cipherHelper.CopyUsernameAsync(groupPageListItem.Cipher); + + try + { + Xamarin.Essentials.Vibration.Vibrate(); + } + catch (Xamarin.Essentials.FeatureNotSupportedException) + { + } } } @@ -653,6 +660,14 @@ namespace Bit.App.Pages if (listItem is GroupingsPageListItem groupPageListItem && groupPageListItem.Cipher?.Type == CipherType.Login) { await _cipherHelper.CopyPasswordAsync(groupPageListItem.Cipher); + + try + { + Xamarin.Essentials.Vibration.Vibrate(); + } + catch (Xamarin.Essentials.FeatureNotSupportedException) + { + } } } }