Hello.
1) I did not touch the application topic; left the one that is by default - AppTheme.
2) I didn’t apply styles to Activity, almost everything suits me.

It does not suit only the height of the header of the activity, you need a smaller one.

Began to getSupportActionBar. I found getHeight and was delighted that there must be a paired setHeight method or something similar. It was not there, I did not even find a similar one. Maybe I looked bad?

There are topics in which the height of the ActionBar suits, but everything else does not suit them, and for some reason they are not installed by the way (the application crashes when switching to the Activity in question).

    1 answer 1

    Create a new xml file in the res / values ​​folder and write such code there

    <?xml version="1.0" encoding="utf-8"?> <resources> <style name="Theme.MyOwnSize" parent="@android:style/Theme.Holo.Light.DarkActionBar"> <item name="actionBarSize">40dp</item> <item name="android:actionBarSize">40dp</item> </style> </resources> 

    And for your Activity, put a topic in the manifest.

     android:theme="@style/Theme.MyOwnSize" 
    • Here is a question about ActionBar , not about Toolbar - zTrap
    • Apparently, as an option, it is proposed to use Toolbar instead of ActionBar ... - Ayrat
    • Now I’ll change answer for ActionBar - androidx
    • Changed the answer ... - androidx
    • To be honest, for some reason, I didn’t work for you - on the Activity in question it crashes. BUT ... You showed me the key two lines that I put where I want to go, and voila =). Thank you, and tick you. - Ayrat