Tutorials ▶ UI ▶ Layout
Tutorials ▶ UI ▶ Layout
Beautiful Animations with ContraintLayout

Minimal coding required

ConstraintLayout seems to be the hot new thing nowadays. Flattening your view hierarchy, improving performance, supporting arbitrary bounding rules — it promises to fix all of the shortcomings of some previous layout files (*cough* I’m looking at you RelativeLayout *cough*) and more. But there is one other benefit of ConstraintLayout that most people are unaware of and the official documentation curiously doesn’t mention anything about: performing cool animations on your ConstraintLayout views with very little code.

How?

I’m going to assume that you know the basics of ConstraintLayout (e.g. you know what is app:layout_constraintLeft_toLeftOf and its relatives). Most of the tutorials on ConstraintLayout focus on using the newly improved Android Studio layout design panel where you can drag/drop/visualize the various constraints. For the purposes of animations, it’s also good to take a peek at the generated XML to get a better understanding of the various constraint attributes so you know how to manipulate them.

Full article


Tutorials ▶ UI ▶ Layout
Fragments Introduction

The mini-me's of Activities

This tutorial is an introduction to Android Fragments. You will learn the fundamental concepts of Android Fragments while creating an app that displays the rage comics.

Update note: This tutorial has been updated to API 25 and Android Studio 2.2.2 by Huyen Tue Dao. The original tutorial was written by Huyen Tue Dao.

fragmentnoun | /’frag-mənt/
an isolated or incomplete part of something.

A fragment is an Android component that holds part of the behavior and/or UI of an activity. As the name intimates, fragments are not independent entities, but are subservient to a single activity.

In many ways, they resemble and echo the functionality of activities.

Full article