mirror of
https://github.com/bitwarden/mobile.git
synced 2024-12-27 17:08:00 +01:00
selectable label effect
This commit is contained in:
parent
26d0077bb8
commit
3d239a3c2b
@ -110,6 +110,7 @@
|
||||
<Compile Include="Autofill\FilledItem.cs" />
|
||||
<Compile Include="Autofill\Parser.cs" />
|
||||
<Compile Include="Autofill\SavedItem.cs" />
|
||||
<Compile Include="Effects\SelectableLabelEffect.cs" />
|
||||
<Compile Include="Effects\TabBarEffect.cs" />
|
||||
<Compile Include="Migration\AndroidKeyStoreStorageService.cs" />
|
||||
<Compile Include="Push\FirebaseInstanceIdService.cs" />
|
||||
|
26
src/Android/Effects/SelectableLabelEffect.cs
Normal file
26
src/Android/Effects/SelectableLabelEffect.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using Android.Support.Design.BottomNavigation;
|
||||
using Android.Support.Design.Widget;
|
||||
using Android.Views;
|
||||
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()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
11
src/App/Effects/SelectableLabelEffect.cs
Normal file
11
src/App/Effects/SelectableLabelEffect.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Bit.App.Effects
|
||||
{
|
||||
public class SelectableLabelEffect : RoutingEffect
|
||||
{
|
||||
public SelectableLabelEffect()
|
||||
: base("Bitwarden.SelectableLabelEffect")
|
||||
{ }
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Bit.App.Effect
|
||||
namespace Bit.App.Effects
|
||||
{
|
||||
public class TabBarEffect : RoutingEffect
|
||||
{
|
@ -1,8 +1,6 @@
|
||||
using Bit.App.Effect;
|
||||
using Bit.App.Effects;
|
||||
using Bit.App.Models;
|
||||
using Bit.App.Resources;
|
||||
using Bit.Core.Abstractions;
|
||||
using Bit.Core.Utilities;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Bit.App.Pages
|
||||
|
@ -6,6 +6,7 @@
|
||||
xmlns:pages="clr-namespace:Bit.App.Pages"
|
||||
xmlns:u="clr-namespace:Bit.App.Utilities"
|
||||
xmlns:controls="clr-namespace:Bit.App.Controls"
|
||||
xmlns:effects="clr-namespace:Bit.App.Effects"
|
||||
xmlns:fab="clr-namespace:Refractored.FabControl;assembly=Refractored.FabControl"
|
||||
xmlns:views="clr-namespace:Bit.Core.Models.View;assembly=BitwardenCore"
|
||||
x:DataType="pages:ViewPageViewModel"
|
||||
@ -480,7 +481,11 @@
|
||||
<Label
|
||||
Text="{Binding Cipher.Notes, Mode=OneWay}"
|
||||
StyleClass="box-value"
|
||||
LineBreakMode="WordWrap" />
|
||||
LineBreakMode="WordWrap">
|
||||
<Label.Effects>
|
||||
<effects:SelectableLabelEffect />
|
||||
</Label.Effects>
|
||||
</Label>
|
||||
</StackLayout>
|
||||
<BoxView StyleClass="box-row-separator" />
|
||||
</StackLayout>
|
||||
|
Loading…
Reference in New Issue
Block a user