1

I want to implement Toolbar something like the following design. It is called flexible toolbar and card toolbarenter image description here

I tried implementing the custom view inside toolbar. I achieved something like below image!enter image description here

Now what I did is added custom view to Toolbar but I want to implement like first image. I want to create a card like view on tool bar with all those action views.

To achieve that (As per my view) I can create a custom layout and add it over tool bar. Then I should attach another layout below the toolbar.

My question is whether I should do it as what I said or is there any other simpler way I can implement it?

Kavin Prabhu
  • 2,307
  • 2
  • 17
  • 36

1 Answers1

2

You should use 2 ToolBars - One for the "ActionBar" and one for the CardView

<FrameLayout>
  <ToolBar /> //the Actionbar ToolBar
  <CardView layout_marginTop="?attr/actionBarSize">
    <ToolBar /> //the Toolbar with the Menu items
    ...
  </CardView>
</FrameLayout> 
Christian
  • 46
  • 1
  • 2