causes the app to crash when I press the options button in the device
Issue is that since you have set the Window.FEATURE_NO_TITLE
to the ActionBarActivity
, the ActionBar
is not created for this Activity
. But your trying to inflate option menus
.
Since ActionBar
is not created for this Activity, when trying to call getMenuInflater
, the ActionBar
is null
FIX: Change the AddNewLocationActivity
to extend Activity
instead of ActionBarActivity
public class AddNewLocationActivity extends ActionBarActivity {
to
public class AddNewLocationActivity extends Activity {
You can still access the Menus
using device option key.