
Как только я меняю родительскую тему на Material3, я получаю следующее:

Это
- это отсутствует заголовок на развернутой панели инструментов
- отсутствует вся панель инструментов после прокрутки вверх
Вот мой макет:
...
мой файл style.xml:
#ff0000
#00ffff
... more colors ...
и моя реализация onCreate():
setContentView(R.layout.activity_detail)
val intent = intent
val cheeseName = intent.getStringExtra(EXTRA_NAME)
val toolbar: com.google.android.material.appbar.MaterialToolbar = findViewById(R.id.toolbar)
// I tried adding this without effect
// toolbar.title = cheeseName
setSupportActionBar(toolbar)
supportActionBar?.setDisplayHomeAsUpEnabled(true)
val collapsingToolbar: CollapsingToolbarLayout = findViewById(R.id.collapsing_toolbar)
collapsingToolbar.title = cheeseName
Подробнее здесь: https://stackoverflow.com/questions/792 ... -material3
Мобильная версия