Top

xamarin.android Tag

Using Effects on Xamarin.Forms

Custom Renderers are useful when we want to customize native controls of a given type all around our app.But when we want to customize only some specific properties of a given native view,¬†we could make use of Effects. An Effect is a simple and reusable piece of code that will allow us to access a native control to customize it.   Let's see a sample that will prevent the underline decoration when an Entry is focused. Core project In the core project add a class inheriting RouttingEffect like this: public class NoUnderlineEffect : RoutingEffect { public NoUnderlineEffect() : base("Blogpost.NoUnderlineEffect") { } } We could add properties to be able to pass parameters and...

Custom Renderers are useful wh...

Read More

Input Validation Approach for Windows 10 UAP, Android and iOS

You have probably faced the problem of validating input fields in your app forms. As you may know, each platform provides different tools to validate text, time and other type of entries. What happens if we need a common solution for our favorite target platforms: Windows 10 UAP, Android and iOS? As DRY principle lovers, we always think about reusing as many code artifacts as possible. The ideal solution would be one compatible for all these platforms. When working with Xamarin and thinking of code reusing, the pattern that comes to mind is MVVM: a pattern that has been always related with many .NET technologies. Our experience with .NET Framework technologies linked with MVVM like WPF or Silverlight, which provided some built-in...

You have probably faced the pr...

Read More

Initial Steps with Xamarin.UITest for Hybrid Apps

Recently we have used Xamarin.UITest to validate the UI of an app developed with Cordova, and Test Cloud to run such on a lot of physical devices. Assuming you have already experience creating a Xamarin.UITest project, the very first thing you will need to play with is running an emulator or a physical device to deploy the app and run the tests. Such is done with this very simple piece of code: [code language="csharp"] public class AppInitializer { public static IApp StartApp(Platform platform, Xamarin.UITest.Configuration.AppDataMode mode = Xamarin.UITest.Configuration.AppDataMode.Auto) { if (platform == Platform.Android) { return ConfigureApp .Android .EnableLocalScreenshots() .ApkFile("../../../Apps/myapp.apk") .StartApp(mode); } return ConfigureApp .iOS .EnableLocalScreenshots() .AppBundle("../../../Apps/myapp.app") .StartApp(mode); } } [/code] Please take note we are going to test the UI of a multiplatform app developed with Cordova for iOS and Android, so we decided to have a single...

Recently we have used Xamarin....

Read More

Case Study: Sage

A few weeks ago Xamarin published one of our Case Studies: Sage. It was a huge effort to bring three mobile apps on multiple form-factors to life, at the same time. Thanks to Xamarin.Android and Xamarin.iOS products, we could share a common codebase between all of them. The entire apps set relies on MvvmCross framework, with customized pieces to support landscape views composed of multiple portrait ones, fly-out menus, etc. We are at Plain Concepts, the Xamarin Team, particularly proud of the job done. The whole document can be found here or here....

A few weeks ago Xamarin publis...

Read More

Translating Designs into Layouts: Units Conversion

One aspect that Apple pushed to the limits is the union between Designers and Developers. Instead of understanding the product development process as a chain, it is done as a very close relationship walking in the same direction. Both of them speak different languages: they use different tools during their day-to-day job, they see different aspects of the product, their definition of done is different, etc. But there is something in common, which turns out to be a quite important thing: both want the product to succeed. Both want to deliver the best shape of what they are working on, and want to exceed the customer's expectations. Thus, it is worth looking for ways to improve this beautiful marriage. Within the following...

One aspect that Apple pushed...

Read More