James Montemagno
James Montemagno

Live, Love, Bike, and Code.

Tags


James Montemagno

Android

Opt-out of Dark Mode on iOS, Android, UWP, and macOS

Everyone can't stop talking about dark mode now that iOS 13 and Android 10 are officially released. To my surprise I have actually really been enjoying dark mode on my desktop and mobile devices. I really want to go through all my apps and add proper dark mode support, however I just haven't had the time. When running apps on iOS 13 or macOS and flipping on dark mode can make your app look.... not so great: This can depend on the framework you are using, hard coded values, or a bunch of other…

James Montemagno James Montemagno

Add ASP.NET Core's Dependency Injection into Xamarin Apps with HostBuilder

Dependency injection(DI) and inversion of control (IoC), have been a recurring theme in questions that I have received over the last six years. Sometimes it is around using constructor injection(), simple service containers, and often around full frameworks such as Prism or MVVM Light. I will be honest with you, I have never been a fan of DI/IoC when building mobile apps. My main reason is that there has never been any official pattern or recommendations from Google or Apple (or Microsoft/Xamari…

James Montemagno James Montemagno

Control Text Size on Android Bottom Navigation View

It seems as though my obsession with the Android Bottom Navigation View aka Bottom Tabs will never end! This time I got a question about controlling the size of the text when the user taps on a tab. The default behavior is to zoom in on the text: Inside of your Android project's Resources/values folder create a new file called dimens.xml if it doesn't exist. Then add the following XML to override the size of the text when it is active and not active: James Montemagno James Montemagno

Xamarin.Forms: Fully Customize Bottom Tabs on Android & Turn Off Shifting

It seems as if the BottomNavigationView aka Bottom Tabs on Android is one of the top things that I write about on my blogs. There was an introduction post [https://blog.xamarin.com/exploring-androids-bottom-navigation-view/], how to use reflection to remove shifting on native Xamarin.Android [https://montemagno.com/remove-shifting-bottomnavigationview-android/], official support in Xamarin.Forms [https://montemagno.com/xamarin-forms-official-bottom-navigation-bottom-tabs-on-android/] , and most…

James Montemagno James Montemagno

Xamarin.Forms: Drop Shadow/Elevation on Android Bottom Navigation TabbedPage

It is a tale as old of time fighting with Android elevation and drop shadows. First it was the Toolbar [https://montemagno.com/xamarin-forms-drop-shadows-on-navigation-toolbar/] on a Navigation page and now it is the new fancy bottom tabs [https://montemagno.com/xamarin-forms-official-bottom-navigation-bottom-tabs-on-android/] that we got in Xamarin.Forms 3.1. I know what you are thinking... another custom renderer... NOPE! You just have to know to set a few different properties correctly. H…

James Montemagno James Montemagno

Enhanced Mobile App Versioning in Azure DevOps (VSTS) with Mobile Tasks

A little over a year ago, I introduced my Mobile App Tasks Extensions for iOS and Android [https://montemagno.com/introducing-vsts-mobile-build-tasks-extension/] into the Azure DevOps (VSTS) marketplace. For iOS and Android developers it made the tasks of versioning and adjusting package names a breeze. They were written completely in TypeScript with VS Code [https://montemagno.com/building-vsts-tasks-with-typescript-and-vs-code/] and of course are open source on GitHub [https://github.com/james…

James Montemagno James Montemagno

Unique Device & App Installation Identifiers for Mobile Apps

One common query I get all the time from developers is how to get a unique device or application identifier [https://github.com/xamarin/Essentials/issues/61] for their mobile app. After deciding to not include an API for this in Xamarin.Essentials we heard a lot of different use cases for it including: * Client/Server Communication * Login Validation * In-App Purchase Verification * Licensing Purposes The next obvious question that you may have is why didn't we include it in Xamarin.Essen…

James Montemagno James Montemagno

Android Emulators On Hyper-V Are Pretty Awesome

I have been a mobile developer for 7 years now and since the day I started one of my largest complaints has been the Android emulator. From the very start we had just ARM emulators that were a complete joke to work with as they moved at a snail's pace. From there a bunch of companies attempted to fix the problem by using custom built solutions on top of Virtual Box or Hyper-V. Google has done a lot of work in the last few years to improve the Android emulators with Quick Boot, more customization…

James Montemagno James Montemagno

I crush code and share it, publish NuGet packages, speak at conferences, upload videos, pretend I am good at playing video games, tweet up a storm, drink gallons of coffee, and ride my bike. Checkout my monthly newsletter that you should subscribe to!