I am making a very custom Toolbar (don't freak, it's for good, not evil, I promise), and I want to put the "Up" arrow (the arrow that appears when there is a parent Activity set or for other reasons and has the nice ripple touch effect on Lollipop) in a custom location.
Is there a way to get this arrow as a View or asset to use somewhere else in the Toolbar?
I could not even find the image asset for the arrow. Any ideas?
For an example, I want top be able to do something like:
mToolbar.addView(arrowView, 0);
mToolbar.addView(titleView, 1);
If you don't want to place arrow icon as custom view in
Toolbar
, alternatively you can set content description to the navigation button and find view reference later. EveryView
orViewGroup
supports finding views with content description.Toolbar is itself a ViewGroup were you can add different views for eg.
Refer your toolbar and its elements from your java code to have control over it as:
Maybe this will help, looks like something that you want, or you want completely custom up button with different position and view?