K
K
Koshkasobaka2021-06-23 20:31:39
Android
Koshkasobaka, 2021-06-23 20:31:39

How to create a ToolBar in a fragment and add a back arrow to it?

I know that in the activity the arrow is set by the command supportActionBar?.setDisplayHomeAsUpEnabled(true), but what about the toolbar in the fragment?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Siomin, 2021-06-23
@Koshkasobaka

(activity as MainActicity).supportActionBar?.setDisplayHomeAsUpEnabled(true)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question