Answer the question
In order to leave comments, you need to log in
How to overcome animation in an application on a device where it is disabled?
Hello!
The application has a MainActivity with an Action bar, which has a button that, when clicked, opens a new SecondActivity.
In this new SecondActivity with
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
the "up" button is set, when you click on it, you return to the MainActivity. Answer the question
In order to leave comments, you need to log in
I solved the problem by refusing to automatically return to the parent activity specified in the manifest when the button is clicked.
Written manually:
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()){
case android.R.id.home:
...
finish();
return true;
...
}
return super.onOptionsItemSelected(item);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question