diff --git a/src/Android/Android.csproj b/src/Android/Android.csproj index 3ba99a4d4..da488db56 100644 --- a/src/Android/Android.csproj +++ b/src/Android/Android.csproj @@ -111,7 +111,6 @@ - @@ -148,6 +147,7 @@ + diff --git a/src/Android/Effects/SelectableLabelEffect.cs b/src/Android/Effects/SelectableLabelEffect.cs deleted file mode 100644 index e14a39526..000000000 --- a/src/Android/Effects/SelectableLabelEffect.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Android.Widget; -using Bit.Droid.Effects; -using Xamarin.Forms; -using Xamarin.Forms.Platform.Android; - -[assembly: ExportEffect(typeof(SelectableLabelEffect), "SelectableLabelEffect")] -namespace Bit.Droid.Effects -{ - public class SelectableLabelEffect : PlatformEffect - { - protected override void OnAttached() - { - if (Control is TextView textView) - { - textView.SetTextIsSelectable(true); - } - } - - protected override void OnDetached() - { - } - } -} diff --git a/src/Android/Renderers/SelectableLabelRenderer.cs b/src/Android/Renderers/SelectableLabelRenderer.cs new file mode 100644 index 000000000..ec4e8aa5e --- /dev/null +++ b/src/Android/Renderers/SelectableLabelRenderer.cs @@ -0,0 +1,25 @@ +using System; +using Android.Content; +using Bit.App.Controls; +using Bit.Droid.Renderers; +using Xamarin.Forms; +using Xamarin.Forms.Platform.Android; + +[assembly: ExportRenderer(typeof(SelectableLabel), typeof(SelectableLabelRenderer))] +namespace Bit.Droid.Renderers +{ + public class SelectableLabelRenderer : LabelRenderer + { + public SelectableLabelRenderer(Context context) : base(context) { } + + protected override void OnElementChanged(ElementChangedEventArgs