I have just begun to learn Android coding and I want to disable the default action bar that is at the upper rim of my main activity and replace it by a toolbar that is customizable. I looked at this webpage and followed the instructions: <https://developer.android.com/training/appbar/setting-up> 

Unfortunately the actionbar does not dissappear. While the toolbar is shown, the actionbar still remains at the upper rim of the activity layout. 

I inserted this code both in the manifest and in the layout file:

application
 android:theme="@style/Theme.AppCompat.Light.NoActionBar"

If I insert it in the layout file, the newly created toolbar becomes transparent, which is not what I want. I want to default action bar to disappear. 
If I insert it in the Manifest, nothing happens

**Here is a part of the xml code of the layout file**:

```
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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:layout_width="match_parent"
    android:layout_height="match_parent"
    android:theme="@style/Theme.AppCompat.Light.NoActionBar"

    tools:context=".MainActivity">

    <android.support.v7.widget.Toolbar
        android:id="@+id/my_toolbar"
        android:layout_width="331dp"
        android:layout_height="62dp"
        android:layout_marginBottom="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginStart="8dp"
        android:layout_marginTop="8dp"
        android:background="?attr/colorPrimary"
        android:elevation="4dp"
        android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.0"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.018"
        app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />

```

I would be very happy, if someone could help me with this. Thanks in advance!!!