Answer the question
In order to leave comments, you need to log in
How to solve the problem with ToolBarom?
I'm trying to embed a toolbar in my application so that I can change it later as I see fit. But when it is initialized, the actionbar data still appears.
Here is the styles.xml code
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
Answer the question
In order to leave comments, you need to log in
What do you mean by "can't post"? Of course, you can't refer to him as an action bar, he's just an ordinary wedge group that lives a bit of its own life. It is necessary to call any methods directly on it, such as toolbar.setTitle (). toolbar.getMenu().and so on.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question