hi there I want align a set of icons in toolbar like below picture.
I googled and after some change I have:
mainActivity.xml
...
This answer might be a bit late. However, using today's current material components library you can use a bottom app bar to achieve your desired result. See pseudo code snippet:
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.bottomappbar.BottomAppBar
android:id="@+id/bottomAppBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
app:backgroundTint="@color/colorBottomBar"
app:fabAlignmentMode="center"
app:contentInsetLeft="0dp"
app:contentInsetStart="0dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
style="?android:attr/borderlessButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1
android:drawableTop="@drawable/ic_blur"
android:gravity="center"
</TextView>
<TextView
style="?android:attr/borderlessButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1
android:drawableTop="@drawable/ic_blur"
android:gravity="center"
</TextView>
<TextView
style="?android:attr/borderlessButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1
android:drawableTop="@drawable/ic_blur"
android:gravity="center"
</TextView>
<TextView
style="?android:attr/borderlessButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1
android:drawableTop="@drawable/ic_blur"
android:gravity="center"
</TextView>
<TextView
style="?android:attr/borderlessButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1
android:drawableTop="@drawable/ic_blur"
android:gravity="center"
</TextView>
<TextView
style="?android:attr/borderlessButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1
android:drawableTop="@drawable/ic_blur"
android:gravity="center"
</TextView>
</LinearLayout>
</com.google.android.material.bottomappbar.BottomAppBar>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
android:drawableTop="@drawable/ic_blur" would be used to represent the icons that you want to have displayed in the bottom app bar.
You would have to import the material components library for you to use the bottom app bar