How to make two toolbars? [on hold]

35
July 11, 2019, at 7:40 PM

I am trying to make this kind of activity:

And I have done the top action bar but I don't know how to make this kind of bottom bar. When I put menu options they are all floating to the right. If you have any suggestion how to do this, please let me know. Thank you.

Answer 1

You need to add a toolbar at the bottom in your layout. You can place this component everywhere and customize it

<android.support.v7.widget.Toolbar
    android:id="@+id/toolbar"
    android:layout_width="match_parent"
    android:layout_height="?attr/actionBarSize"
    android:background="?attr/colorPrimary"/>
Answer 2

Try this and change your elevation

<FrameLayout 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"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
    android:id="@+id/content"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_weight="1">
<Toolbbar Your Toolbar/>
    <TextView
        android:id="@+id/message"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="@dimen/activity_vertical_margin"
        android:layout_marginLeft="@dimen/activity_horizontal_margin"
        android:layout_marginRight="@dimen/activity_horizontal_margin"
        android:layout_marginTop="@dimen/activity_vertical_margin"
        android:text="@string/title_home" />
</FrameLayout>
<android.support.design.widget.BottomNavigationView
    android:id="@+id/navigation"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom"
    android:background="?android:attr/windowBackground"
    app:menu="@menu/navigation" />
<android.support.design.widget.FloatingActionButton
    android:id="@+id/floatingActionButton"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom|center_horizontal"
    android:layout_marginBottom="40dp"
    android:clickable="true"
    app:elevation="8dp"
    app:srcCompat="@android:drawable/ic_input_add" />

READ ALSO
Is there a way to put a video into an AlertDialog? [duplicate]

Is there a way to put a video into an AlertDialog? [duplicate]

This question already has an answer here:

33
Android : How to integrate Push Notification to an already existing app?

Android : How to integrate Push Notification to an already existing app?

How to integrate Push Notification to an already existing android app?

42
Unexpected behaviour of onChildAdded stream in firebase_database

Unexpected behaviour of onChildAdded stream in firebase_database

I've recently started learning Flutter and the FlutterFire pluginsYesterday I was working with the firebase_database plugin which allows adding Firebase Realtime Database to Flutter

61
How to use SQLite in android fragments?

How to use SQLite in android fragments?

I am an aspiring android developerI wanted to make a simple project with SQLtite support, but I ran into the problem of SQLite whith Fragment

45