title: How to add a right text in BottomAppBar?
body: <p>I have a BottomAppBar in my App, is there a way to add a TextView at the right of it?</p>
  <p>In a fragment the Menu will be hidden and instead of it i would show the text view.</p>
  <p>I've tried to add the TextView inside the BottomAppBar XML but it's added only at the start and if i set the width to match parent i will stop before the menu..</p>
  <p>Here is what i've tried</p>
  <pre><code>&lt;com.google.android.material.bottomappbar.BottomAppBar
      android:id=&quot;@+id/bottomAppBar&quot;
      style=&quot;@style/Widget.MaterialComponents.BottomAppBar.Colored&quot;
      android:layout_gravity=&quot;bottom&quot;
      app:hideOnScroll=&quot;true&quot;
      app:navigationIcon=&quot;@drawable/ic_baseline_menu_24&quot;
      app:menu=&quot;@menu/bottom_app_bar&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;wrap_content&quot; &gt;
  
  
  
      &lt;TextView
          style=&quot;?android:attr/borderlessButtonStyle&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:gravity=&quot;center|end&quot;
          android:text=&quot;articoli: 1&quot;
          android:textColor=&quot;#FFFFFF&quot; /&gt;
  
  &lt;/com.google.android.material.bottomappbar.BottomAppBar&gt;
  </code></pre>
  <p>But it looks like this:</p>
  <p><a href="https://i.stack.imgur.com/SBr2C.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SBr2C.png" alt="enter image description here" /></a></p>
  <p>While i would that text to be at the right side where the filter icon is..</p>