Question: I have decided to make my own Tool bar 

So i removed the regular ToolBar :

```
<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="false"
    android:theme="@style/Theme.AppCompat.Light.NoActionBar> //removetollbar

```

and make my own tool bar 

```
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

</android.support.v7.widget.Toolbar>

```

then i include in main xml

```
<include
    layout="@layout/customtoolbar"
    android:id="@+id/custombar" >

</include>

```

and in the code i set it up : 

```
_CustomToolBar = (android.support.v7.widget.Toolbar) 
findViewById(R.id.custombar);
setSupportActionBar(_CustomToolBar);
android.support.v7.widget.Toolbar _CustomToolBar;

```

> 
> now when the app run the custom toolbar is not there
> 
> 
> 

Please help.

Answer: 
In your `<include>` tag, you've set the id of the toolbar to be `@+id/custombar`, but you're looking it up using `R.id.toolbar`. Change that line to this:

```
_CustomToolBar = (android.support.v7.widget.Toolbar) findViewById(R.id.custombar);

```
Didn't get your question clearly, but still I will post how I code to set custom toolbar. 

1) My Manifest have NoActionBar theme to remove default toolbar.

2) My custom\_toolbar.xml file - 

```
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/toolbar"
    android:layout_width="match_parent"
    android:layout_height="?attr/actionBarSize"
    android:background="?attr/colorPrimary"
    android:elevation="5dp"
    app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />

```

3) Way I include it in my main.xml

```
<include layout="@layout/custom_toolbar" />

```

4) My Java code - 

```
// In onCreate method
android.support.v7.widget.Toolbar _CustomToolBar = (android.support.v7.widget.Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(_CustomToolBar);

```

And it is working properly. 

[![enter image description here](https://i.stack.imgur.com/xyddz.png)](https://i.stack.imgur.com/xyddz.png)

So Here whats the different between our code.

1) Give your custom toolbar proper id `android:id="@+id/customToolbar"` instead of giving it to you `include`.   

2) Give height and background color to your custom toolbar so that it will be visible properly

```
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"

```

3) And instead of linking `include id` to toolbar, link your `custom toolbar id`

```
findViewById(R.id.customToolbar);

```