Open francisco50 opened 4 years ago
https://developer.android.com/training/appbar/setting-up
We first need to change our toolbar to an Appbar to make our toolbar contain menus and clickable. The code below gets that done.
<application android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
<android.support.v7.widget.Toolbar android:id="@+id/my_toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" android:elevation="4dp" android:theme="@style/ThemeOverlay.AppCompat.ActionBar" app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
https://developer.android.com/training/appbar/setting-up
We first need to change our toolbar to an Appbar to make our toolbar contain menus and clickable. The code below gets that done.
<application android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
The next code below creates the AppBar itself
<android.support.v7.widget.Toolbar android:id="@+id/my_toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" android:elevation="4dp" android:theme="@style/ThemeOverlay.AppCompat.ActionBar" app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
We then need to add it to the specific java class we want to add our menus to