Last active
July 6, 2017 03:46
-
-
Save yinyue200/5a2ed916f176581b080d8b7395c52493 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//********************************************************* | |
// | |
// Copyright (c) yinyue200.com. All rights reserved. | |
// This code is licensed under the MIT License (MIT). | |
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF | |
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY | |
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR | |
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. | |
// | |
//********************************************************* | |
using Android.OS; | |
using Xamarin.Forms; | |
using Xamarin.Forms.Platform.Android; | |
[assembly: ExportEffect(typeof(yfxsApp.Controls.Effects.SearchBarUnexceptDisappearFixEffect), nameof(yfxsApp.Controls.Effects.SearchBarUnexceptDisappearFixEffect))] | |
namespace yfxsApp.Controls.Effects | |
{ | |
class SearchBarUnexceptDisappearFixEffect : PlatformEffect | |
{ | |
protected override void OnAttached() | |
{ | |
if(Build.VERSION.SdkInt==BuildVersionCodes.N&&Element is SearchBar sb) | |
{ | |
sb.HeightRequest = 48; | |
} | |
} | |
protected override void OnDetached() | |
{ | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment