Toolbar's popup menu - custom background (color and borders)
Asked Answered
T

0

0

How can I make such popup item menu for my toolbar (support v7)?

screenshot of transparent toolbar's popup menu (MX Player)

I found out how to make transparent background:

from layout

  <android.support.v7.widget.Toolbar
      android:id="@+id/toolbar"
      android:layout_width="match_parent"
      android:layout_height="?attr/actionBarSize"
      android:theme="@style/MyToolbarTheme"/>

from style

  <style name="ToolbarTheme" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
    <item name="android:colorBackground">@color/my_transparent_color</item>
  </style>

but how to add borders?

p.s. using shape android:background will cause a lot of shapes everywhere

<item name="android:background">@drawable/background_with_borders</item>
Tightlipped answered 9/5, 2018 at 18:18 Comment(2)
checkout #19353989Acquittance
@Acquittance nothing to check thereTightlipped

© 2022 - 2024 — McMap. All rights reserved.