mirror of
https://github.com/bitwarden/mobile
synced 2025-12-10 13:23:39 +00:00
selectable label effect
This commit is contained in:
@@ -110,6 +110,7 @@
|
|||||||
<Compile Include="Autofill\FilledItem.cs" />
|
<Compile Include="Autofill\FilledItem.cs" />
|
||||||
<Compile Include="Autofill\Parser.cs" />
|
<Compile Include="Autofill\Parser.cs" />
|
||||||
<Compile Include="Autofill\SavedItem.cs" />
|
<Compile Include="Autofill\SavedItem.cs" />
|
||||||
|
<Compile Include="Effects\SelectableLabelEffect.cs" />
|
||||||
<Compile Include="Effects\TabBarEffect.cs" />
|
<Compile Include="Effects\TabBarEffect.cs" />
|
||||||
<Compile Include="Migration\AndroidKeyStoreStorageService.cs" />
|
<Compile Include="Migration\AndroidKeyStoreStorageService.cs" />
|
||||||
<Compile Include="Push\FirebaseInstanceIdService.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;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace Bit.App.Effect
|
namespace Bit.App.Effects
|
||||||
{
|
{
|
||||||
public class TabBarEffect : RoutingEffect
|
public class TabBarEffect : RoutingEffect
|
||||||
{
|
{
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
using Bit.App.Effect;
|
using Bit.App.Effects;
|
||||||
using Bit.App.Models;
|
using Bit.App.Models;
|
||||||
using Bit.App.Resources;
|
using Bit.App.Resources;
|
||||||
using Bit.Core.Abstractions;
|
|
||||||
using Bit.Core.Utilities;
|
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace Bit.App.Pages
|
namespace Bit.App.Pages
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
xmlns:pages="clr-namespace:Bit.App.Pages"
|
xmlns:pages="clr-namespace:Bit.App.Pages"
|
||||||
xmlns:u="clr-namespace:Bit.App.Utilities"
|
xmlns:u="clr-namespace:Bit.App.Utilities"
|
||||||
xmlns:controls="clr-namespace:Bit.App.Controls"
|
xmlns:controls="clr-namespace:Bit.App.Controls"
|
||||||
|
xmlns:effects="clr-namespace:Bit.App.Effects"
|
||||||
xmlns:fab="clr-namespace:Refractored.FabControl;assembly=Refractored.FabControl"
|
xmlns:fab="clr-namespace:Refractored.FabControl;assembly=Refractored.FabControl"
|
||||||
xmlns:views="clr-namespace:Bit.Core.Models.View;assembly=BitwardenCore"
|
xmlns:views="clr-namespace:Bit.Core.Models.View;assembly=BitwardenCore"
|
||||||
x:DataType="pages:ViewPageViewModel"
|
x:DataType="pages:ViewPageViewModel"
|
||||||
@@ -480,7 +481,11 @@
|
|||||||
<Label
|
<Label
|
||||||
Text="{Binding Cipher.Notes, Mode=OneWay}"
|
Text="{Binding Cipher.Notes, Mode=OneWay}"
|
||||||
StyleClass="box-value"
|
StyleClass="box-value"
|
||||||
LineBreakMode="WordWrap" />
|
LineBreakMode="WordWrap">
|
||||||
|
<Label.Effects>
|
||||||
|
<effects:SelectableLabelEffect />
|
||||||
|
</Label.Effects>
|
||||||
|
</Label>
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
<BoxView StyleClass="box-row-separator" />
|
<BoxView StyleClass="box-row-separator" />
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
|
|||||||
Reference in New Issue
Block a user