Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android toolbar popupTheme vs theme

Often I see this declaration of Toolbar in layout files:

<android.support.v7.widget.Toolbar     xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="match_parent"     android:layout_height="?attr/actionBarSize"     app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"     app:popupTheme="@style/ThemeOverlay.AppCompat.Light"> </android.support.v7.widget.Toolbar> 

Why are there two attributes relating theming: theme and popupTheme?

What are the purposes of each of them?

like image 370
Vitaly Zinchenko Avatar asked Dec 03 '15 09:12

Vitaly Zinchenko


People also ask

What is Popup theme Android?

Specifies the theme to use when inflating popup menus. By default, uses the same theme as the Toolbar itself. theme. It is simply the theme of Toolbar .

What is ThemeOverlay?

ThemeOverlay. AppCompat is used to override (or "overlay") that theme for specific views, especially the Toolbar.


1 Answers

  1. popupTheme

    Specifies the theme to use when inflating popup menus. By default, uses the same theme as the Toolbar itself.

  2. theme

    It is simply the theme of Toolbar.

like image 132
Nouman Ghaffar Avatar answered Oct 12 '22 13:10

Nouman Ghaffar