Solutions

Android Squared CardView

Recently, I had to add a perfect squared CardView and I wanted to achieve this without hardcoding its width and height. I happily discovered the power of ConstraintLayout. And so this is how I managed to create a perfect square which should work on every dimension. Heres some sample code that I used to create […]

, , ,
Kotlin collections and mutability
Privacy Policy

Kotlin Mutable and Immutable Collections

In this article I would like to emphasise over a few options that we have when working with data structure and more precisely with collections in a mutable and immutable fashion. So let’s start with a few of them and see their mutability state. But first, what makes a list mutable or immutable? Immutable Collections

, , , ,
Privacy Policy

Android Studio / IntelliJ IDEA productivity guide

Android Studio and productivity One interesting feature that Android Studio and IntelliJ IDEA have is the Productivity Guide panel. It helps you see how much of the productivity tools that are available and you are using. You can see here a quick screenshot with the one I have, on one of the computers I am

, ,
Articles, Solutions

Load instrumentation test local files

Sometimes you might need to add setup files (json/xml/.properties/etc.) to your instrumentation tests (androidTest) and load them in your tests. You usually do that when loading for example some mocked data set or some fixture. In testing, fixtures often take the form of JSON or yaml files that mimic the responses from real API calls.

, , ,
Articles, Solutions

Print Android instrumentation tests logs in the terminal/console

While debugging some Android instrumentation tests that were ran using adb shell am instrument, I needed to print some logs into the terminal/console to inspect the flow and resolve some issues. Ever been coding away, trying to track down what’s happening under the hood, thinking Log.i/e/d or System.out would be your trusty sidekicks for logging

, , , ,
Tutorial

Android Simple Section RecylerView

In this tutorial I will create a simple Sectioned RecyclerView that will show 2 sections and a few items in each section and how to move an item from one section to another. Note: For RecyclerView I used AndroidX imports and not android.support.v7.widget.RecyclerView Setup We need to import the recycler view from AndroidX. The build.gradle

, , , ,
Privacy Policy

Xamarin Forms: ActivityIndicator Size

We all will need at some point to show an activity indicator when our app has to perform lenghty data processing operations or when we have to wait for our app to load content. In Xamarin Forms we can use in a xaml file this property called ActivityIndicator. Below is the result of the above

, , ,
Privacy Policy

Xamarin Forms: Circle With Label No Renderer

In your application you might need to create a Circle image with a text inside it or just a simple circle that needs different colors for status for example. In this case we can use a Frame and add CornerRadius property like this: As you can see, there are more properties added like HasShadow or

, , , , ,
Uncategorized

Xamarin Forms: Label LineBreakMode

You can set a LineBreakMode attribute to a Label that can have the following values: TailTruncation HeadTruncation MiddleTruncation CharacterWrap WordWrap NoWrap TailTruncation If you have a text that is to large to fit the width of your label, you can use the attribute called LineBreakMode=TailTruncation. This will display a text with “…” at the end

Privacy Policy

Kotlin RecyclerView with Click Listener

Create a RecyclerView in Android with Kotlin – A Step-by-Step Guide In today’s tutorial we’ll learn how to create a RecyclerView in Kotlin for Android with items that are clickable. This approach, distinct from the traditional ListView, offers a more dynamic and flexible way to display a scrollable list. Read on to discover how to

Scroll to Top