Constraint Layout is one of the most popular jetpack libraries and we’re happy to share that Constraint Layout 2.0 is out! It has all of the features of Constraint Layout 1.1 that you’re familiar with to build complex layouts quickly, with tooling integrated with Android Studio to preview your XML or even edit your layout.
Constraint Layout 2.0 brings several new features to Constraint Layout. To use it, bump the version in build.gradle
.
implementation “androidx.constraintlayout:constraintlayout:2.0.1”
With the release of 2.0 we’ve also created a github repository for Constraint Layout. …
The new One Tap sign-in and sign-up on Android helps you optimize the flow for authenticating users in your app. For many Android apps, user accounts are an important part of the conversion funnel and a common source of user drop-off. Users (and developers alike!) often forget which account they signed in with or what password they used for your service. By optimizing the process, you can improve conversion rates and reduce drop-off.
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
.
build.gradle
(no libraries dependencies)activity_awesome.xml
→ ActivityAwesomeBinding.java
)build.gradle
to enable view bindingYou don’t need to include any extra libraries to enable view binding. It’s built into…
If you’re implementing SMS verification using one-time-codes into your app, check out the new SMS User Consent API.
SMS verification is a common way to add a second form of verification to apps. By sending an SMS message containing a one-time-code like “1234” or “481236” to the user’s phone number, they can then enter the code into your app to confirm that they received the SMS message.
From: SMS
Message: Your one-time code is 1234.
But — let’s be honest. No one actually enjoys typing out one-time-codes. It’s tedious and error prone. …
This is part of a multi-part series about using Coroutines on Android. This post focuses on solving practical problems using coroutines by implementing one shot requests.
Part one and two of this series focused on how coroutines can be used to simplify code, provide main-safety on Android, and avoid leaking work. With that background, they look like a great solution to both background processing and a way to simplify callback based code on Android.
So far, we’ve focused on what coroutines are and how to manage them. In this post we’ll look at how to use them to accomplish some…
This is part of a multi-part series about using Coroutines on Android. This post focuses on starting work and keeping track of work that has been started.
In part one, we explored the problems that coroutines are great at solving. As a recap, coroutines are a great solution to two common programming problems:
To solve these problems, coroutines build upon regular functions by adding suspend and resume. …
This is part of a multi-part series about using Coroutines on Android. This post focuses on how coroutines work and what problems they solve.
Kotlin coroutines introduce a new style of concurrency that can be used on Android to simplify async code. While they’re new to Kotlin in 1.3, the concept of coroutines has been around since the dawn of programming languages. The first language to explore using coroutines was Simula in 1967.
In the last few years, coroutines have grown in popularity and are now included in many popular programming languages such as Javascript, C#, Python, Ruby, and Go…
The more Kotlin code we write, the more we love it! Kotlin’s modern language features together with Android KTX made our Android code more concise, clear and pleasant. We (@objcode and @FMuntenescu) started the #31DaysOfKotlin series as a way of sharing some of our favorite Kotlin and Android KTX features and hopefully get more of you to like it as much as we do.
Week 4 looked at more language basics then dove into some ways Android KTX makes your code more concise and readable!
Check out the recaps for weeks 1, 2, and 3:
Constraint Layout simplifies creating complex layouts in Android by making it possible to build most of your UI using the visual editor in Android Studio. It’s often described as a more powerful RelativeLayout
. With Constraint Layout you can define complex layouts without building complicated view hierarchies.
Constraint Layout 1.1 was recently released as stable and there’s a lot to love. A complete overhaul of optimization makes most layouts run even faster than before and new features like barriers and groups make real-world designs simple!
dependencies {
compile 'com.android.support.constraint:constraint-layout:1.1.0'
}
To use the new features in your project add Constraint Layout…
The more Kotlin code we write, the more we love it! Kotlin’s modern language features together with Android KTX made our Android code more concise, clear and pleasant. We (@objcode and @FMuntenescu) started the #31DaysOfKotlin series as a way of sharing some of our favorite Kotlin and Android KTX features and hopefully get more of you to like it as much as we do.
In the second we we continued to explore Kotlin — going deeper into topics like sealed classes and inline.
Check out the other recaps:
In Kotlin, everything is public by default! Well, almost. Kotlin has a…
Android Developer Advocate @Google