I have an activity and want to have these conditions:
I know this question is asked before, but no correct answer I found.
Add in style.xml
<style name="generalnotitle" parent="Theme.AppCompat.Light" >
<item name="android:windowNoTitle">true</item> <!-- //this -->
</style>
add in manifiest file Activity ,
android:theme="@style/generalnotitle">
To get Orientation of Device
int display_mode = getResources().getConfiguration().orientation;
if (display_mode == Configuration.ORIENTATION_LANDSCAPE) {
getSupportActionBar().hide(); //<< this
} else {
}
setContentView(R.layout.activity_main);
Landscape mode without Title bar