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
| using System; | |
| using System.Collections.Generic; | |
| using System.IdentityModel.Tokens.Jwt; | |
| using System.IO; | |
| using System.Security.Claims; | |
| using System.Security.Cryptography; | |
| using Microsoft.IdentityModel.Tokens; | |
| namespace FirebaseTest.Mobile.Helpers | |
| { |
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
| public override void ViewWillAppear(bool animated) | |
| { | |
| if (TabBar.Items == null) | |
| { | |
| return; | |
| } | |
| foreach (UITabBarItem tabItem in TabBar.Items) | |
| { | |
| UpdateTabBarItemAppearance(tabItem); |
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
| protected override void OnElementChanged(ElementChangedEventArgs<TabbedPage> e) | |
| { | |
| base.OnElementChanged(e); | |
| if (Element == null || e.OldElement != null) | |
| { | |
| return; | |
| } | |
| if(Element.OnThisPlatform().GetToolbarPlacement() != ToolbarPlacement.Bottom) |
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
| // ANDROID | |
| public double GetStringWidthMeasure(string stringToMeasure) | |
| { | |
| using (var bounds = new Android.Graphics.Rect()) | |
| { | |
| using (var textView = new TextView(Application.Context)) | |
| { | |
| var lineCount = textView.LineCount; // line count, I guess! | |
| textView.Paint?.GetTextBounds(stringToMeasure, 0, stringToMeasure.Length, bounds); | |
| var displayMetrics = new DisplayMetrics(); |
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
| [assembly: ExportRenderer(typeof(YourCustomWebView), typeof(yourcompany.Droid.Renderers.ChromeClientWebViewRenderer))] | |
| namespace yourcompany.Droid.Renderers | |
| { | |
| internal class ChromeClientWebViewRenderer : WebViewRenderer | |
| { | |
| public AdvancedWebViewRenderer(Context context) : base(context) | |
| { | |
| } | |
| protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.WebView> e) |
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
| internal class AdvancedWebViewRenderer : WebViewRenderer | |
| { | |
| private readonly float _density; | |
| public AdvancedWebViewRenderer(Context context) : base(context) | |
| { | |
| var displayMetrics = new DisplayMetrics(); | |
| CrossCurrentActivity.Current.Activity.WindowManager.DefaultDisplay.GetMetrics(displayMetrics); | |
| _density = displayMetrics.Density; | |
| } |
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
| <PropertyGroup Condition=" '$(RunConfiguration)' == 'Default' "> | |
| <AppExtensionDebugBundleId /> | |
| <ExtraLaunchArgs>--argument=-FIRDebugEnabled</ExtraLaunchArgs> // Add this line! | |
| </PropertyGroup> |
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
| public class AdvancedTabbedPageRenderer : TabbedRenderer | |
| { | |
| private Rectangle _initialContainerArea; | |
| public override void ViewDidLayoutSubviews() | |
| { | |
| base.ViewDidLayoutSubviews(); | |
| if (View == null) | |
| { | |
| return; |
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
| // [assembly: ExportRenderer... | |
| internal class AdvancedContentPageRenderer : PageRenderer | |
| { | |
| public override void ViewDidAppear(bool animated) | |
| { | |
| base.ViewDidAppear(animated); | |
| ViewController.NavigationController.InteractivePopGestureRecognizer.Enabled = true; | |
| ViewController.NavigationController.InteractivePopGestureRecognizer.WeakDelegate = ViewController; | |
| } |
NewerOlder