mirror of
https://github.com/bitwarden/android.git
synced 2024-11-01 07:35:52 +03:00
28 lines
765 B
C#
28 lines
765 B
C#
using Bit.iOS.Renderers;
|
|
using UIKit;
|
|
using Xamarin.Forms;
|
|
using Xamarin.Forms.Platform.iOS;
|
|
|
|
[assembly: ExportRenderer(typeof(SearchBar), typeof(CustomSearchBarRenderer))]
|
|
namespace Bit.iOS.Renderers
|
|
{
|
|
public class CustomSearchBarRenderer : SearchBarRenderer
|
|
{
|
|
protected override void OnElementChanged(ElementChangedEventArgs<SearchBar> e)
|
|
{
|
|
base.OnElementChanged(e);
|
|
if(e.NewElement is SearchBar)
|
|
{
|
|
UpdateKeyboardAppearance();
|
|
}
|
|
}
|
|
|
|
private void UpdateKeyboardAppearance()
|
|
{
|
|
if(!Core.Utilities.ThemeHelpers.LightTheme)
|
|
{
|
|
Control.KeyboardAppearance = UIKeyboardAppearance.Dark;
|
|
}
|
|
}
|
|
}
|
|
}
|