mirror of
https://github.com/bitwarden/mobile.git
synced 2024-06-25 10:26:02 +02:00
4aad34cd75
* Dynamic theme switching and visual tweaks * update action runner to use macos-11 for iOS 15 support * additional tweaks * refinements * refinements * formatting and tweaks
31 lines
811 B
C#
31 lines
811 B
C#
using Android.Graphics.Drawables;
|
|
using Bit.Droid.Effects;
|
|
using Bit.Droid.Utilities;
|
|
using Xamarin.Forms;
|
|
using Xamarin.Forms.Platform.Android;
|
|
|
|
[assembly: ExportEffect(typeof(FabShadowEffect), "FabShadowEffect")]
|
|
namespace Bit.Droid.Effects
|
|
{
|
|
public class FabShadowEffect : PlatformEffect
|
|
{
|
|
protected override void OnAttached ()
|
|
{
|
|
if (Control is Android.Widget.Button button)
|
|
{
|
|
var gd = new GradientDrawable();
|
|
gd.SetColor(ThemeHelpers.FabColor);
|
|
gd.SetCornerRadius(100);
|
|
|
|
button.SetBackground(gd);
|
|
button.Elevation = 6;
|
|
button.TranslationZ = 20;
|
|
}
|
|
}
|
|
|
|
protected override void OnDetached ()
|
|
{
|
|
}
|
|
}
|
|
}
|