android toolbar popupTheme vs theme

AndroidAndroid Support-LibraryAndroid AppcompatAndroid Toolbar

Android Problem Overview


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?

Android Solutions


Solution 1 - Android

  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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionVitaly ZinchenkoView Question on Stackoverflow
Solution 1 - AndroidNouman GhaffarView Answer on Stackoverflow