So, i found out what my problem was!
in styles.xml file:
<!-- the theme applied to the application or activity --> <style name="CustomActionBarTheme" parent="@android:style/Theme.Holo"> <item name="android:windowActionBarOverlay">true</item> </style> </resources>
i just needed to change the attribute windowActionBarOverlay to false, and it makes automatically the resize for the activity content.
For more details, here is the documentation