I would like to add a button in the navigation drawer menu, I was trying to create a new item in the nav_header_main and giving it the property of a button but it did not work, how would I add a button in my dropdown menu?
something like that
add a new item
<item
android:id="@+id/salir"
android:title=""
android:actionLayout="@layout/button_salir"
app:showAsAction="ifRoom"/>
I created an xml button but when adding it to the item it doesn't show me the button
<Button xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_width="match_parent"
android:text="Login"
android:layout_height="50dp"/>
and where would your code go. Thanks for the help :)
I did it once, but instead of a button I used a TextView.
and in my activity I added the following
Hope this can help you