I have an android app, in which I made a parent activity (let's say "BaseActivity") that all activities extend from that. In "BaseActivity", I made a toolbar with some images, like this:
setSupportActionBar(toolbar);
View view = getLayoutInflater().inflate(R.layout.header, binding.getRoot(), false);
toolbar.addView(view);
It works ok until I use a fragmentdialog (usually this fragment takes some photos) or switch between apps (for example after making call)
after switching app or opening dialog Still other part of app work as I expected.
I need your advice :)