I'm trying to add AcionBar to my application.
I created a BaseActivity where all other activities extend it:
BaseActivity.java
public class BaseActivity extends ActionBarActivity{
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// TODO Auto-generated method stub
return super.onCreateOptionsMenu(menu);
}
}
MainActivity.java
public class Main extends BaseActivity {
// other code..
}
AndroidManifest.xml:
<application
android:icon="@drawable/icon"
android:label="@string/app_name"
android:theme="@style/BaseTheme" >
<activity
android:name="omar.asd.Main"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
themes.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="BaseTheme" parent="@style/Theme.AppCompat.Light">
<!-- hide the Window Title -->
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
<!-- You could change the scrollbar, checkbox style, anything! -->
</style>
</resources>
As you can see, I created a custom theme, BaseTheme, to apply "Theme.AppCompat.Light" to all the application..
The problem is that the ActionBar doesnt appear in any activity..
Why is this?