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. using Xamarin.Forms; using System; using System.Linq; using System.Diagnostics; namespace YourNamespace { public partial class…

Read More Read More

Loop Through An Objects Properties In C#

Loop Through An Objects Properties In C#

By Jon Skeet: public bool ReflectiveEquals(object first, object second) { if (first == null && second == null) { return true; } if (first == null || second == null) { return false; } Type firstType = first.GetType(); if (second.GetType() != firstType) { return false; // Or throw an exception } // This will only use public properties. Is that enough? foreach (PropertyInfo propertyInfo in firstType.GetProperties()) { if (propertyInfo.CanRead) { object firstValue = propertyInfo.GetValue(first, null); object secondValue = propertyInfo.GetValue(second, null); if…

Read More Read More

Button on Android all caps

Button on Android all caps

Solved by adding the following to your styles.xml file which can be found in the Android project under the Resources then values folders. <item name=”android:textAllCaps”>false</item>

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 aligned. (On right-to-left…

Read More Read More

Xamarin – When/Why use command

Xamarin – When/Why use command

Here’s a couple short features, but you really want to do more reading on the topic of commands because there is a bunch more to know that can be covered in a thread post. This is just my ‘major benefits’ explanation. Commands are less coupled than events. Think of them as the next evolution of the Event. For example, on an event you have to subscribe directly to that instance. MyClassInstance.SomeEvent += eventHandlerMethod(); Which most times means you have to…

Read More Read More

Các loại kiểm thử phần mềm + Quy trình Test

Các loại kiểm thử phần mềm + Quy trình Test

KIỂM TRA PHẦN MỀM (KTPM) LÀ GÌ ? Thực ra KTPM là công việc mà bất cứ người nào từng tham gia phát triển phần mềm (PTPM) đều biết và từng làm. Theo nghĩa thông thường nhất, KTPM bao gồm việc “chạy thử” PM hay một chức năng của PM, xem nó “chạy” đúng như mong muốn hay không. Việc kiểm tra này có thể thực hiện từng chặng, sau mỗi chức năng hoặc module được phát triển, hoặc thực…

Read More Read More