My java code:
Button equations = (Button) findViewById(R.id.algebrabutton);
equations.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
Intent myIntent = new Intent(view.getContext(),
algebra_activity.class);
startActivityForResult(myIntent, 0);
}
});
Button word = (Button) findViewById(R.id.wordbutton);
word.setOnClickListener(new View.OnClickListener() {
public void onClick(View view1) {
Intent myIntent1 = new Intent(view1.getContext(),
word_activity.class);
startActivityForResult(myIntent1, 0);
}
});
Error log :
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.lawrencej.mathappdeluxe/com.example.lawrencej.mathappdeluxe.algebra_activity}:
java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor.
Do not request Window.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead
When I click the word button, it works fine and displays a new screen. When I click the equations button, the app crashes. Am I doing something wrong?