background preloader


Facebook Twitter

Coding Games and Programming Challenges to Code Better. Creating Custom Views in Android. The Android platform offers a large range of user interface widgets that are sufficient for the needs of most applications.

Creating Custom Views in Android

These widgets are great and certainly provide us with functional and appealing end products, but sometimes us software developers like to think outside of the box and develop our own custom interfaces. What is the best way to approach this type of creativity? By building a custom View! How to create a Custom Button in Android Studio (Kotlin 2020) Stop repeating yourself and create custom views on Android with Kotlin. We all know what custom views are right ?

Stop repeating yourself and create custom views on Android with Kotlin

And we know how powerful they can be. But sometimes we might be forgetting why we should create custom views. We can create custom Views to build complicated Views that the Android Framework doesn’t give us like this. Android Custom View Tutorial. Advanced Android in Kotlin 02.1: Creating Custom Views. 9.

Advanced Android in Kotlin 02.1: Creating Custom Views

Task: Add accessibility Accessibility is a set of design, implementation, and testing techniques that enable your app to be usable by everyone, including people with disabilities. Common disabilities that can affect a person's use of an Android device include blindness, low vision, color blindness, deafness or hearing loss, and restricted motor skills. When you develop your apps with accessibility in mind, you make the user experience better not only for users with these disabilities, but also for all of your other users. Afficher une liste d'éléments avec un RecyclerView [AK 6] La base SQLite sous Android et Kotlin - Vidéo Tuto. How to use a simple SQLite database in Kotlin android? This example demonstrates how to use a simple SQLite database in Kotlin android.

How to use a simple SQLite database in Kotlin android?

Step 1 − Create a new project in Android Studio, go to File ⇉ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Add the following code to src/MainActivity.kt Step 4 − Add the following code to src/DataBaseHelper.kt Step 5 − Add the following code to androidManifest.xml. Use view binding to replace findViewById. New in Android Studio 3.6, view binding gives you the ability to replace findViewById with generated binding objects to simplify code, remove bugs, and avoid all the boilerplate of findViewById.

Use view binding to replace findViewById

Enable view binding in build.gradle (no libraries dependencies)View binding generates a binding object for every layout in your module (activity_awesome.xml → object contains one property for every view with an id in the layout — with the correct type and null-safetyFull support for both the Java programming language and Kotlin Update build.gradle to enable view binding You don’t need to include any extra libraries to enable view binding. Your First Kotlin Android App. Comment réaliser un morpion en kotlin ? - L'art de créer son application android. L'art de créer son application android - Apprenons ensemble à réaliser une belle application qui vous ressemble.

Exploring Kotlin Multiplatform (Part 1) 22 Kotlin Extensions for Cleaner Code. Now when we have an Uri, we may want to open it in a browser.

22 Kotlin Extensions for Cleaner Code

There are two ways to do this: Open it inside the appOpen it in an external browser We usually want to keep users inside our app, but some schemas can’t be opened inside. For example, we don’t want to open in the in-app browser. Even more, we want to open only and We’ll add three different extensions. To open a web page inside an app, we need to either create a separate activity, or use a library that’ll do it for us. Web App With Kotlin.js: Getting Started. Créer des modules partagés entre Android et iOS avec Kotlin Multiplatform - Publicis Sapient Engineering - Engineering Done Right. Aujourd’hui, nous comment écrire en Kotlin un qui peut être partagé entre une application iOS et une application Android.

Créer des modules partagés entre Android et iOS avec Kotlin Multiplatform - Publicis Sapient Engineering - Engineering Done Right

Depuis la prise en charge de la cration de frameworks iOS, introduite avec Kotlin/Native 0.5 en décembre 2017, il est devenu possible de partager bibliothèques pour Android (.aar) et iOS (.framework). En revanche, ce n’est que depuis l’annonce de Kotlin/Native 0.6 que le partage de code est implementable facilement, en vertu du support de Multiplatform, une nouvelle fonctionnalité dédiée à ce cas d’usage ajoutée dans la version 1.2 du langage Kotlin. L’objectif d’aujourd’hui sera de créer un module iOS et un module Android partageant une interface commune mais fournissant deux implémentation légèrement différentes, les deux écrites en Kotlin. Multiplatform supporte une DSL introduisant deux nouveaux types de modules : Nous allons commencer par là où nous avons terminé dans . Pour rappel notre module ne faisait rien fait une valeur de chaîne. Le projet commun . Code iOS . Draw Custom Views in Android. Get control over the view while… In one of my projects, I had the requirement of creating a circular TextView to display the count of notifications.

Draw Custom Views in Android. Get control over the view while…

Here we need to create a subclass of TextView. Step 1: Create a class with the name CircularTextView. Step 2: Extend the TextView widget class. Now, the IDE pops an error on TextView saying this type has a constructor and must be initialized here. Step 3: Add constructors to the class. Why Should I use Kotlin for Cross Platform App Development? // Touchlab. First Step with Kotlin Multiplatform (Amel Azzi) Asynchronous Flow. Edit Page Table of contents Suspending functions asynchronously returns a single value, but how can we return multiple asynchronously computed values?

Asynchronous Flow

This is where Kotlin Flows come in. Multiple values can be represented in Kotlin using collections. For example, we can have a function foo() that returns a List of three numbers and then print them all using forEach:

Design patern

RxKotlin RxJava. Le RecycleView en Kotlin en 4 étapes - L'art de créer son application android. Advanced Programming With Kotlin - Better Programming - Medium. Comment gérer plusieurs Activity en kotlin ? - L'art de créer son application android. Comme chaque semaine, mon nouvel article !

Comment gérer plusieurs Activity en kotlin ? - L'art de créer son application android

Si vous avez lu mon précédent article “TextWatcher en kotlin”, vous savez qu’actuellement je travaille sur une nouvelle application que je présenterai prochainement. Dans cette application, je vais utiliser deux activités (activity) qui communiqueront entre elles pour s’échanger des données. Dans cet article je vais vous rappeler la notion d’activité (activity) et vous expliquez comment gérer plusieurs activités sur votre application android. Nous verrons également la notions d’intent avec les activités sans trop rentrer dans les possibilités que la notion nous offre. La notion d’intent possède beaucoup de fonctionnalités qui nécessitent d’être traitées dans un ou plusieurs articles pour aborder l’essentielle. Une activity c’est quoi ? Une activité (en anglais : activity) sur android c’est le cœur de l’application. Votre application peut posséder plusieurs écrans donc plusieurs activités. Kotlin with Volley — Varvet. Volley is my go-to networking library in Android and naturally I wanted to bring it with me when moving to Kotlin.

A la decouverte du langage Kotlin. I-A. JSON To Kotlin Class (JsonToKotlinClass) - Plugins. Kotlin - Interface avec les implémentations par défaut. Kotlin – Kt. Academy. 8-Minute Crash Course on Kotlin Programming Language. Swift vs Kotlin — The differences that matter - Animesh Mishra - Medium. A Comparison of Swift and Kotlin Languages. Apprendre a programmer avec kotlin 08 TP1 Calculatrice. 10 Useful Kotlin String Extensions - Better Programming - Medium. Android & Kotlin Tutorials. Resources. Swift vs. Kotlin — the differences that matter - Indoorway Blog. Many of you have probably seen this comparison of Swift and Kotlin. It looks quite interesting, right?

Yes, I agree that there are many parallels in these languages, but in this article I will focus on some aspects that make them different. I have been an Android Developer since 2013 and most of the time I spent on developing apps in Java. Visibility Modifiers. Edit Page Classes, objects, interfaces, constructors, functions, properties and their setters can have visibility modifiers. (Getters always have the same visibility as the property.) There are four visibility modifiers in Kotlin: private, protected, internal and public.

Introduction à Kotlin pour Android. Dagger 2 for Dummies in Kotlin (with 20 lines of code) Multiplatform native development in Kotlin. Now with iOS! KotlinConf was a great event! There was a lot of inspiring ideas and a lot of announcements. Especially there was one huge announcement that excited everyone: Kotlin/Native started supporting iOS. JetBrains presented two applications to demonstrate Kotlin/Native possibilities: Kotlin app (Play, iTunes, Github) — is a real multiplatform application! Server-site is in Kotlin/JVM, Website in Kotlin/JS, Android in Kotlin/JVM and iOS in Kotlin/Native.