Question: I want to add a custom action title on the left of the actin bar, replacing with the default title just like in the below image the default image is shown

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

And here I want to add this title.

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

Answer: 
You need to change the logo and the title in action bar.

You can use 

```
getActivity().getActionBar().setTitle("your title");

```

and 

```
getActivity().getActionBar().setLogo(your draw id);

```
You need to use the following code to get this: 

```
private ActionBar actionBar;

protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        actionBar = getActionBar();
        actionBar.setTitle("");
        actionBar.setLogo(R.drawable.logo); //logo needs to be defined in the drawables folder.
}

```