Hosts files and the Google Android emulator

Hosts files and the Google Android emulator

Using the Google Android emulator is a good way to test how a website behaves on Android devices. Connecting to your local computer http://10.0.2.2 is the URL to connect to a website hosted on your local computer. localhost or 127.0.0.1 will not work! This is all defined in the documentation on Android emulator networking. Using a hosts file The Android emulator will not make use of your local hosts file. This is unfortunate when your website relies on host headers to work…

Read More Read More

Clone git repo hosted on a Windows shared folder from Mac OS X

Clone git repo hosted on a Windows shared folder from Mac OS X

I kind of like to think that remote file system access is an OS thing, and that cloning repos is an application-level thing, so this would be my approach: You should just be able to mount that SMB share with your OS’es functions to a local directory and clone from there, instead of hoping git has a transport for SMB. How to mount: Connect to the server on your Mac. Now, on your Mac, from Finder’s Go menu, choose “Connect…

Read More Read More

Xamarin Forms: Lazy load tabs in TabbedPage

Xamarin Forms: Lazy load tabs in TabbedPage

Source: https://enginecore.blogspot.com/2019/01/xamarin-forms-lazy-load-tabs-in_10.html In Xamarin Forms, we sometimes need the TabbedPage to display a tab layout. You can checkout the great official documentation hereabout how to create and use a TabbedPage. Problem: Every tab is a Page instance The TabbedPage is a multi page container where every tab is a Page object. No matter how you create the tabs (either by setting the TabbedPage.Children page collection with Page instances or by setting TabbedPage.ItemsSource and TabbedPage.ItemTemplate) the TabbedPage needs a Page instance for every tab and uses the Page.Title property to display the text header on the tab…

Read More Read More

Versioning Android apps

Versioning Android apps

If you need to improve the versioning scheme of your android app, then you are reading the right story. Let’s discover together some good practices and their advantages. Semantic Versioning There is something in the software world called Semantic Versioning. It consists on a couple of conventions to assign version numbers to your software. You can (or maybe should) read all the details here. Basically, the idea is the following: Given a version number MAJOR.MINOR.PATCH, increment the: MAJOR version when you make…

Read More Read More

How can I run a method in the background on my Xamarin app?

How can I run a method in the background on my Xamarin app?

Source: https://stackoverflow.com/questions/45209784/how-can-i-run-a-method-in-the-background-on-my-xamarin-app/45210187 What we did in our forms application was to make use of the Device.Timer and the Stopwatch class that available in System.Diagnostics, and Xamarin.Forms to create a very generic managed timer that we could interact with using the onStart, onSleep and onResume methods in Xamarin.Forms. This particular solution doesn’t require any special platform specific logic, and the device timer and stopwatch are non UI blocking. Edit:  To give some context as to how the above solution works step by…

Read More Read More

Xamarin.Forms’s LayoutOptions

Xamarin.Forms’s LayoutOptions

Short answer Start, Center, End and Fill define the view’s alignment within its space. Expand defines whether it occupies more space if available. Theory The structure LayoutOptions controls two distinct behaviors: Alignment: How is the view aligned within the parent view? Start: For vertical alignment the view is moved to the top. For horizontal alignment this is usually the left-hand side. (But note, that on devices with right-to-left language setting this is the other way around, i.e. right aligned.) Center: The view is centered. End: Usually the view is bottom or right…

Read More Read More