Skip to main content

Posts

Showing posts from November, 2020

Design Android Tool bar with constraint layout

 Toolbar in Android plays a very important role in quick page movement.  Steps to implement toolbar in Android 1. Create a layout file toolbar.xml in r es/layout directory 2. add below code into your toolbar.xml file. 3. Customize this as per your requirement <? xml version ="1.0"  encoding ="utf-8" ?> <layout xmlns: android ="http://schemas.android.com/apk/res/android" xmlns: app ="http://schemas.android.com/apk/res-auto" xmlns: tools ="http://schemas.android.com/tools" > <androidx.appcompat.widget.Toolbar android :id ="@+id/toolbar" android :layout_width ="match_parent" android :layout_height ="?attr/actionBarSize" android :background ="@color/colorPrimaryDark" app :elevation ="0dp" app :layout_collapseMode ="pin" > <androidx.constraintlayout.widget.ConstraintLayout android