Hello I would like to apply a custom Backgroundlayout just for my Main Activity. I couldn’t find a solution. Can somebody give me some tips?
would like to have just a simple TextView with a background in the Actionbar. Is this possible?
I managed to remove the icon and set a backgroundimage. But how can I set the gravity of the text to center and change the typefont?
getSupportActionBar().setDisplayShowHomeEnabled(false);
getSupportActionBar().setBackgroundDrawable(getResources().getDrawable(myimage));
It should look like this:

thanks!
You have to set a custom layout for the Actionbar like this:
In your layout you can then add a TextView and set its gravity to
center. E.g.:Then you can set your custom typefont inside your Activity from your assets like this: