diff --git a/src/Android/Android.csproj b/src/Android/Android.csproj index a514138f6..29f1d56e5 100644 --- a/src/Android/Android.csproj +++ b/src/Android/Android.csproj @@ -110,6 +110,7 @@ + diff --git a/src/Android/Effects/FixedSizeEffect.cs b/src/Android/Effects/FixedSizeEffect.cs new file mode 100644 index 000000000..8d31aac8a --- /dev/null +++ b/src/Android/Effects/FixedSizeEffect.cs @@ -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(FixedSizeEffect), "FixedSizeEffect")] +namespace Bit.Droid.Effects +{ + public class FixedSizeEffect : PlatformEffect + { + protected override void OnAttached() + { + if(Element is Label label && Control is TextView textView) + { + textView.SetTextSize(Android.Util.ComplexUnitType.Pt, (float)label.FontSize); + } + } + + protected override void OnDetached() + { + } + } +} \ No newline at end of file diff --git a/src/Android/Renderers/CipherViewCellRenderer.cs b/src/Android/Renderers/CipherViewCellRenderer.cs index d93e12172..774fd40dc 100644 --- a/src/Android/Renderers/CipherViewCellRenderer.cs +++ b/src/Android/Renderers/CipherViewCellRenderer.cs @@ -118,7 +118,7 @@ namespace Bit.Droid.Renderers MoreButton.Typeface = _miTypeface; var small = (float)Device.GetNamedSize(NamedSize.Small, typeof(Label)); - Icon.SetTextSize(ComplexUnitType.Sp, 22.0952380952381F); + Icon.SetTextSize(ComplexUnitType.Pt, 10); Name.SetTextSize(ComplexUnitType.Sp, (float)Device.GetNamedSize(NamedSize.Medium, typeof(Label))); SubTitle.SetTextSize(ComplexUnitType.Sp, small); SharedIcon.SetTextSize(ComplexUnitType.Sp, small); diff --git a/src/App/Controls/CipherViewCell/CipherViewCell.xaml b/src/App/Controls/CipherViewCell/CipherViewCell.xaml index 44991a3d1..696223100 100644 --- a/src/App/Controls/CipherViewCell/CipherViewCell.xaml +++ b/src/App/Controls/CipherViewCell/CipherViewCell.xaml @@ -32,7 +32,7 @@ Grid.RowSpan="2" HorizontalOptions="Center" VerticalOptions="Center" - StyleClass="list-icon" /> + StyleClass="list-icon, list-icon-platform" /> - + + StyleClass="list-icon, list-icon-platform"> + + + +