francisco50 / AcmApp

New Acm App
1 stars 0 forks source link

How can we go back to the previews activity ? Research into Manifest.xml and Gradle file. #7

Open francisco50 opened 4 years ago

francisco50 commented 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" />

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