I am using AppTheme.NoActionBar
. I am trying to remove title bar from app.
Here what i have already tried.
Tried settings android:theme="@style/Theme.NoTitleBar"
this gives me error cannot resolve symbol
Tried adding requestWindowFeature(Window.FEATURE_NO_TITLE);
in onCreate method before setting ContentView
it doesn't affect anything
Here are the post i posts i already tried
How to hide the title bar for an Activity in XML with existing custom theme
What i am trying to do is i am creating a custom UI and want the app full screen(want to show notification bar).
Also my app is targeted for Api level 10 and above
Update Here are few more things i tried https://chat.stackoverflow.com/rooms/113175/discussion-between-arthur-leao-and-akash-kumar suggested by @ArhturLeao
Update 2
Tried @android:style/Theme.NoTitleBar
on a new sample project worked as expected(had to extened Activity class instead of AppCompactActivity class)
Tried same with project i am having issue and it still shows Blank TitleBar.
Here is the project i am having trouble with https://github.com/skywebdeveloper/Tikona-Session-Manager/tree/design
**Update 3 **
onCreate
Method
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
CookieHandler.setDefault(new CookieManager());
popupLoader = new ProgressDialog(this);
url = getSharedPreferences("url", MODE_PRIVATE);
sessionPreference = getSharedPreferences("session", MODE_PRIVATE);
sessionStart = (TextView) findViewById(R.id.sessionStartValue);
sessionDuration = (TextView) findViewById(R.id.sessionDurationValue);
sessionUsage = (TextView) findViewById(R.id.sessionUsageValue);
logout = new AlertDialog.Builder(this);
logout.setMessage("Are you sure you want logout?").setTitle("Confirm Logout");
logout.setPositiveButton("Logout", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
//Call logout uri
logout();
}
});
logout.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
//Do nothing
}
});
logout.create();
//fetchSessionDetails();
getURLs();
}
style.xml
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
</resources>