📚Learning ConstraintLayout — 🚀Live Templates for Rescue 🚒

Save time and improve productivity by using Live Templates for ConstraintLayout

😐 ConstraintLayout in Normal Way

Centering a TextView in ConstraintLayout

🚒 Live Templates for Rescue

Live Templates in Android Studio Settings

➕ Importing ConstraintLayout Live Templates

ConstraintLayout Live Templates in Android Studio Settings

✏️How to Use — Some Examples

center

Typing ‘center’ automatically adds all constraints to center the view
app:layout_constraintTop_toTopOf=”parent”
app:layout_constraintBottom_toBottomOf=”parent”
app:layout_constraintStart_toStartOf=”parent”
app:layout_constraintEnd_toEndOf=”parent”

centerh

app:layout_constraintStart_toStartOf=”parent”
app:layout_constraintEnd_toEndOf=”parent”

centerv

app:layout_constraintTop_toTopOf=”@+id/$ID$”
app:layout_constraintBottom_toBottomOf=”@+id/$ID$”

vertical

app:layout_constraintTop_toTopOf=”@+id/VIEW_ID_GOES_HERE
app:layout_constraintBottom_toBottomOf=”@+id/VIEW_ID_GOES_HERE

horizontal

app:layout_constraintStart_toStartOf=”@+id/VIEW_ID_GOES_HERE
app:layout_constraintEnd_toEndOf=”@+id/VIEW_ID_GOES_HERE

📃 ConstraintLayout Live Templates in One Place

🔥 Google Dev Expert (GDE) in Android . 📱 Android Dev . 💻FOSS Contributor . 📝Writer . 🎤 Speaker . 👶 Developer Dad — 🌐Subscribe at https://wajahatkarim.com