【问题标题】:How do you set the title color for the new Toolbar?如何设置新工具栏的标题颜色?
【发布时间】:2015-01-07 05:55:59
【问题描述】:

我正在使用新的 v7 工具栏,但终生无法弄清楚如何更改标题的颜色。我已将工具栏的@style 设置为在styles.xml 中声明的样式,并应用了带有textColor 的titleTextStyle。我错过了什么吗?我正在为 Lollipop 编写代码,但目前在 Kitkat 设备上进行测试。

styles.xml

<resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="@style/Theme.AppCompat.Light">
        <item name="android:windowNoTitle">true</item>
        <item name="windowActionBar">false</item>
    </style>

    <style name="ActionBar" parent="Theme.AppCompat">
        <item name="android:background">@color/actionbar_background</item>
        <item name="android:titleTextStyle">@style/ActionBar.TitleTextStyle</item>
    </style>

    <style name="ActionBar.TitleTextStyle" parent="@style/TextAppearance.AppCompat.Widget.ActionBar.Title">
        <item name="android:textColor">@color/actionbar_title_text</item>
    </style>

</resources>

actionbar.xml:

<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/toolbar_actionbar"
    android:layout_width="match_parent"
    android:layout_height="?actionBarSize"
    style="@style/ActionBar"/>

【问题讨论】:

    标签: android themes toolbar


    【解决方案1】:

    选项 1) 快速简便的方法(仅限工具栏)

    从 appcompat-v7-r23 开始,您可以直接在 Toolbar 或其样式上使用以下属性:

    app:titleTextColor="@color/primary_text"
    app:subtitleTextColor="@color/secondary_text"
    

    如果您的最低 SDK 为 23 并且您使用原生 Toolbar,只需将命名空间前缀更改为 android

    在 Java 中,您可以使用以下方法:

    toolbar.setTitleTextColor(Color.WHITE);
    toolbar.setSubtitleTextColor(Color.WHITE);
    

    这些方法采用颜色 int 而不是颜色资源 ID!

    选项 2) 覆盖工具栏样式和主题属性

    布局/xxx.xml

    <android.support.v7.widget.Toolbar
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:minHeight="?attr/actionBarSize"
        android:theme="@style/ThemeOverlay.MyApp.ActionBar"
        app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
        style="@style/Widget.MyApp.Toolbar.Solid"/>
    

    值/样式.xml

    <style name="Widget.MyApp.Toolbar.Solid" parent="Widget.AppCompat.ActionBar">
        <item name="android:background">@color/actionbar_color</item>
        <item name="android:elevation" tools:ignore="NewApi">4dp</item>
        <item name="titleTextAppearance">...</item>
    </style>
    
    <style name="ThemeOverlay.MyApp.ActionBar" parent="ThemeOverlay.AppCompat.ActionBar">
        <!-- Parent theme sets colorControlNormal to textColorPrimary. -->
        <item name="android:textColorPrimary">@color/actionbar_title_text</item>
    </style>
    

    救命!我的图标也变色了!

    @PeterKnut 报告这会影响溢出按钮、导航抽屉按钮和后退按钮的颜色。它还会更改SearchView 的文本颜色。

    关于图标颜色:colorControlNormal 继承自

    • android:textColorPrimary 用于深色主题(黑底白字)
    • android:textColorSecondary 用于浅色主题(白底黑字)

    如果您将此应用到操作栏的主题,您可以自定义图标颜色。

    <item name="colorControlNormal">#de000000</item>
    

    在 r23 之前的 appcompat-v7 中存在一个错误,要求您也像这样覆盖本机对应项:

    <item name="android:colorControlNormal" tools:ignore="NewApi">?colorControlNormal</item>
    

    帮助!我的 SearchView 是一团糟!

    注意:此部分可能已过时。

    由于您使用的搜索小部件由于某种原因使用了与 appcompat-v7 中包含的不同的后退箭头(不是视觉上的,技术上的),因此您必须在 应用程序的主题中手动设置它。支持库的可绘制对象被正确着色。否则它将永远是白色的。

    <item name="homeAsUpIndicator">@drawable/abc_ic_ab_back_mtrl_am_alpha</item>
    

    至于搜索视图文本...没有简单的方法。在挖掘了它的源代码后,我找到了一种进入文本视图的方法。我没有对此进行测试,所以如果这不起作用,请在 cmets 中告诉我。

    SearchView sv = ...; // get your search view instance in onCreateOptionsMenu
    // prefix identifier with "android:" if you're using native SearchView
    TextView tv = sv.findViewById(getResources().getIdentifier("id/search_src_text", null, null));
    tv.setTextColor(Color.GREEN); // and of course specify your own color
    

    奖励:覆盖 ActionBar 样式和主题属性

    默认操作 appcompat-v7 操作栏的适当样式如下所示:

    <!-- ActionBar vs Toolbar. -->
    <style name="Widget.MyApp.ActionBar.Solid" parent="Widget.AppCompat.ActionBar.Solid">
        <item name="background">@color/actionbar_color</item> <!-- No prefix. -->
        <item name="elevation">4dp</item> <!-- No prefix. -->
        <item name="titleTextStyle">...</item> <!-- Style vs appearance. -->
    </style>
    
    <style name="Theme.MyApp" parent="Theme.AppCompat">
        <item name="actionBarStyle">@style/Widget.MyApp.ActionBar.Solid</item>
        <item name="actionBarTheme">@style/ThemeOverlay.MyApp.ActionBar</item>
        <item name="actionBarPopupTheme">@style/ThemeOverlay.AppCompat.Light</item>
    </style>
    

    【讨论】:

    • 此解决方案有多种副作用。 textColorPrimary 也应用于导航抽屉按钮和搜索小部件中的文本。此外,后退按钮的颜色设置为白色(不要问我为什么)。
    • @PeterKnut 当时我没有意识到建议的解决方案是多么不完整。编辑后 - 这就是我使用它的方式并且它有效。但是请查看搜索视图文本颜色 sn-p。
    • 现在它几乎可以正常工作了。两个注意事项:在搜索小部件中挖掘文本不是一个好主意,它的 id 将来可以更改。 Widget.MyApp.ActionBar 中的背景属性也会影响按钮和工具提示中的背景。背景必须直接在 中设置。
    • 我同意,这不是一个好主意,我至少会在那里添加一个空检查(但是该 id 更改的几率是多少)。关于背景:你错了,如果你将它作为 style 添加到工具栏元素,则背景仅适用于工具栏小部件。如果您在ThemeOverlay 中定义背景并将其用作主题,那么每个子元素的背景也会被着色。
    • 好的,风格与主题的对比是对的。我的错。
    【解决方案2】:

    如果您只需要更改标题颜色而不是搜索小部件中的文本颜色,这是我的解决方案。

    layout/toolbar.xml

    <android.support.v7.widget.Toolbar
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:id="@+id/toolbar"
        android:background="@color/toolbar_bg"
        app:theme="@style/AppTheme.Toolbar"
        app:titleTextAppearance="@style/AppTheme.Toolbar.Title"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:minHeight="?attr/actionBarSize"/>
    

    values/themes.xml

    <resources>
        <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
            <item name="windowActionBar">false</item>
        </style>
    
        <style name="AppTheme.Toolbar" parent="ThemeOverlay.AppCompat.ActionBar">
            <!-- Customize color of navigation drawer icon and back arrow --> 
            <item name="colorControlNormal">@color/toolbar_icon</item>
        </style>
    
        <style name="AppTheme.Toolbar.Title" parent="TextAppearance.Widget.AppCompat.Toolbar.Title">
            <!-- Set proper title size -->
            <item name="android:textSize">@dimen/abc_text_size_title_material_toolbar</item>
            <!-- Set title color -->
            <item name="android:textColor">@color/toolbar_title</item>
        </style>
    </resources>
    

    同样的方法,你也可以设置 subtitleTextAppearance。

    【讨论】:

    • 我遇到了一个问题,即标题的颜色会根据工具栏是存在于片段中还是存在于活动中而有所不同。使用这个技巧来覆盖颜色是我能找到的唯一解决方法(其他改变颜色的方法不起作用)。我希望这会帮助更多的人。谢谢!
    • @Peter Knut 您需要指定这只适用于 API21 及更高版本,这使它无用
    • @DoruChidean 使用 Jelly Bean (API 16) 进行测试:它就像一个魅力!
    • 无法在活动中设置主题。 IE,
    【解决方案3】:

    如果您支持 API 23 及更高版本,您现在可以使用 titleTextColor attribute 设置工具栏的标题颜色。

    layout/toolbar.xml

    <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:titleTextColor="@color/colorPrimary"
            />
    

    MyActivity.java

    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar)
    toolbar.setTitleTextColor(Color.WHITE);
    

    【讨论】:

    • appcompat 库似乎也支持这些。
    【解决方案4】:

    在我的android.support.v7.widget.Toolbar 上设置app:titleTextColor 也适用于Android 4.4 和6.0 上的com.android.support:appcompat-v7:23.1.0

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_height="wrap_content"
        android:layout_width="match_parent"
        android:minHeight="?attr/actionBarSize"
        android:background="?attr/colorPrimary"
        app:titleTextColor="@android:color/white" />
    

    【讨论】:

    • 注意命名空间是app而不是android。
    • 只需添加这一行 app:titleTextColor="@android:color/white" 在 kitkat 及以上版本中也适用于我。谢谢@hunyadym
    【解决方案5】:

    这让我很恼火,我不喜欢给出的任何答案,所以我查看了源代码以了解它是如何工作的。

    FractalWrench 在正确的路径上,但它可以在 API 23 以下使用,并且不必在它自己的工具栏上设置。

    正如其他人所说,您可以使用

    在工具栏上设置样式
    app:theme="@style/ActionBar"
    

    在该样式中,您可以使用

    设置标题文本颜色
    <item name="titleTextColor">#00f</item>
    

    对于 pre API 23 或对于 23+

    <item name="android:titleTextColor">your colour</item>
    

    完整的xml

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_height="?attr/actionBarSize"
        android:layout_width="match_parent"
        app:theme="@style/ActionBar"
        app:popupTheme="@style/ThemeOverlay.AppCompat.Dark"/>
    
    
    <style name="ActionBar" parent="@style/ThemeOverlay.AppCompat.ActionBar">
        <item name="android:titleTextStyle">@style/ActionBarTextStyle</item>
        <item name="titleTextColor">your colour</item>
        <item name="android:background">#ff9900</item>
    </style>
    

    这里是工具栏可以设置的所有属性

    <declare-styleable name="Toolbar">
        <attr name="titleTextAppearance" format="reference" />
        <attr name="subtitleTextAppearance" format="reference" />
        <attr name="title" />
        <attr name="subtitle" />
        <attr name="gravity" />
        <attr name="titleMargins" format="dimension" />
        <attr name="titleMarginStart" format="dimension" />
        <attr name="titleMarginEnd" format="dimension" />
        <attr name="titleMarginTop" format="dimension" />
        <attr name="titleMarginBottom" format="dimension" />
        <attr name="contentInsetStart" />
        <attr name="contentInsetEnd" />
        <attr name="contentInsetLeft" />
        <attr name="contentInsetRight" />
        <attr name="maxButtonHeight" format="dimension" />
        <attr name="navigationButtonStyle" format="reference" />
        <attr name="buttonGravity">
            <!-- Push object to the top of its container, not changing its size. -->
            <flag name="top" value="0x30" />
            <!-- Push object to the bottom of its container, not changing its size. -->
            <flag name="bottom" value="0x50" />
        </attr>
        <!-- Icon drawable to use for the collapse button. -->
        <attr name="collapseIcon" format="reference" />
        <!-- Text to set as the content description for the collapse button. -->
        <attr name="collapseContentDescription" format="string" />
        <!-- Reference to a theme that should be used to inflate popups
             shown by widgets in the toolbar. -->
        <attr name="popupTheme" format="reference" />
        <!-- Icon drawable to use for the navigation button located at
             the start of the toolbar. -->
        <attr name="navigationIcon" format="reference" />
        <!-- Text to set as the content description for the navigation button
             located at the start of the toolbar. -->
        <attr name="navigationContentDescription" format="string" />
        <!-- Drawable to set as the logo that appears at the starting side of
             the Toolbar, just after the navigation button. -->
        <attr name="logo" />
        <!-- A content description string to describe the appearance of the
             associated logo image. -->
        <attr name="logoDescription" format="string" />
        <!-- A color to apply to the title string. -->
        <attr name="titleTextColor" format="color" />
        <!-- A color to apply to the subtitle string. -->
        <attr name="subtitleTextColor" format="color" />
    </declare-styleable>
    

    【讨论】:

      【解决方案6】:

      通过材质组件库,您可以使用 app:titleTextColor 属性。

      布局中,您可以使用如下内容:

      <com.google.android.material.appbar.MaterialToolbar
          app:titleTextColor="@color/...."
          .../>
      

      您也可以使用自定义样式

      <com.google.android.material.appbar.MaterialToolbar
           style="@style/MyToolbarStyle"
          .../>
      

      with(扩展Widget.MaterialComponents.Toolbar.Primary风格):

        <style name="MyToolbarStyle" parent="Widget.MaterialComponents.Toolbar.Primary">
             <item name="titleTextColor">@color/....</item>
        </style>
      

      或(扩展Widget.MaterialComponents.Toolbar 样式):

        <style name="MyToolbarStyle" parent="Widget.MaterialComponents.Toolbar">
             <item name="titleTextColor">@color/....</item>
        </style>
      

      您还可以使用 android:theme 属性覆盖样式定义的颜色(使用 Widget.MaterialComponents.Toolbar.Primary 样式):

          <com.google.android.material.appbar.MaterialToolbar
              style="@style/Widget.MaterialComponents.Toolbar.Primary"
              android:theme="@style/MyThemeOverlay_Toolbar"
              />
      

      与:

        <style name="MyThemeOverlay_Toolbar" parent="ThemeOverlay.MaterialComponents.Toolbar.Primary">
          <!-- This attributes is also used by navigation icon and overflow icon -->
          <item name="colorOnPrimary">@color/...</item>
        </style>
      

      或者(使用Widget.MaterialComponents.Toolbar风格):

          <com.google.android.material.appbar.MaterialToolbar
              style="@style/Widget.MaterialComponents.Toolbar"
              android:theme="@style/MyThemeOverlay_Toolbar2"
      

      与:

        <style name="MyThemeOverlay_Toolbar3" parent="ThemeOverlay.MaterialComponents.Toolbar.Primary">
          <!-- This attributes is used by title -->
          <item name="android:textColorPrimary">@color/white</item>
      
          <!-- This attributes is used by navigation icon and overflow icon -->
          <item name="colorOnPrimary">@color/secondaryColor</item>
        </style>
      

      【讨论】:

        【解决方案7】:

        CollapsingToolbarLayout 更改Toolbar 标题颜色的最简单方法。

        将以下样式添加到CollapsingToolbarLayout

        <android.support.design.widget.CollapsingToolbarLayout
                app:collapsedTitleTextAppearance="@style/CollapsedAppBar"
                app:expandedTitleTextAppearance="@style/ExpandedAppBar">
        

        styles.xml

        <style name="ExpandedAppBar" parent="@android:style/TextAppearance">
                <item name="android:textSize">24sp</item>
                <item name="android:textColor">@android:color/black</item>
                <item name="android:textAppearance">@style/TextAppearance.Lato.Bold</item>
            </style>
        
            <style name="CollapsedAppBar" parent="@android:style/TextAppearance">
                <item name="android:textColor">@android:color/black</item>
                <item name="android:textAppearance">@style/TextAppearance.Lato.Bold</item>
            </style>
        

        【讨论】:

          【解决方案8】:

          如果你可以使用 appcompat-v7 app:titleTextColor="#fff">

          <android.support.v7.widget.Toolbar  
                  android:id="@+id/toolbar"  
                  android:layout_width="match_parent"  
                  android:layout_height="wrap_content"  
                  android:background="@color/colorPrimary"   
                  android:visibility="gone"   
                  app:titleTextColor="#fff">   
              </android.support.v7.widget.Toolbar>   
          

          【讨论】:

            【解决方案9】:

            为了改变颜色

            <android.support.v7.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_height="wrap_content"
                android:layout_width="match_parent"
                android:background="?attr/colorPrimary"
            

            />

            Toolbar myToolbar = (Toolbar) findViewById(R.id.toolbar);
                    myToolbar.setTitleTextColor(ContextCompat.getColor(getApplicationContext(), R.color.Auth_Background));
                    setSupportActionBar(myToolbar);
            

            【讨论】:

              【解决方案10】:

              这对我有用

              <android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
                  xmlns:app="http://schemas.android.com/apk/res-auto"
                  android:id="@+id/toolbar"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:background="?attr/colorPrimary"
                  android:fitsSystemWindows="true"
                  android:minHeight="?attr/actionBarSize"
                  app:navigationIcon="@drawable/ic_back"
                  app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
                  app:subtitleTextColor="@color/white"
                  app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
                  app:title="This week stats"
                  app:titleTextColor="@color/white">
              
              
                  <ImageView
                      android:id="@+id/submitEditNote"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_alignParentEnd="true"
                      android:layout_alignParentRight="true"
                      android:layout_gravity="right"
                      android:layout_marginRight="10dp"
                      android:src="@android:drawable/ic_menu_manage" />
              </android.support.v7.widget.Toolbar>
              

              【讨论】:

                【解决方案11】:

                在您的 xml...toolbar.xml 中创建一个工具栏:

                <android.support.v7.widget.Toolbar
                        android:id="@+id/toolbar"
                
                    </android.support.v7.widget.Toolbar>
                

                然后在你的toolbar.xml中添加以下内容:

                app:titleTextColor="@color/colorText"
                app:title="@string/app_name">
                

                记住@color/colorText 只是您的color.xml 文件,其中包含名为colorText 的颜色属性和您的颜色。这是调用您的字符串的最佳方式,而不是在您的toolbar.xml 中硬编码您的颜色。您还可以通过其他选项来修改文本,例如:textAppearance...等...只需输入 app:text... intelisense 会在 android studio 中为您提供选项。

                您的最终工具栏应如下所示:

                 <android.support.v7.widget.Toolbar
                        android:id="@+id/toolbar"
                        android:layout_width="match_parent"
                        android:layout_height="?attr/actionBarSize"
                        android:layout_weight="1"
                        android:background="?attr/colorPrimary"
                        app:layout_scrollFlags="scroll|enterAlways"
                        app:popupTheme="@style/Theme.AppCompat"
                       app:subtitleTextAppearance="@drawable/icon"
                        app:title="@string/app_name">
                    </android.support.v7.widget.Toolbar>
                

                注意:这个工具栏应该在你的 activity_main.xml.Easy Peasie 中

                另一种选择是在你的课堂上做这一切:

                Toolbar toolbar = findViewById(R.id.toolbar);
                setSupportActionBar(toolbar);
                toolbar.setTitleTextColor(Color.WHITE);
                

                祝你好运

                【讨论】:

                • 嘿,谢谢这个作品。但是您知道如何仅在样式中使用该属性吗?而不是使 xml 更加混乱。谢谢:)
                • 显然你的 @color 直接来自你的字符串资源。这样你的 xml 比硬编码你的颜色更整洁。
                【解决方案12】:

                今天我为此苦苦挣扎了几个小时,因为所有这些答案都已经过时了,现在有了 MDC 和新的主题功能,我只是看不出如何将app:titleTextColor 应用程序范围内的样式覆盖。

                答案是titleTextColor 在styles.xml 中是可用的,你正在覆盖从Widget.AppCompat.Toolbar 继承的东西。今天我觉得最好的选择应该是Widget.MaterialComponents.Toolbar

                <style name="Widget.LL.Toolbar" parent="@style/Widget.MaterialComponents.Toolbar">
                     <item name="titleTextAppearance">@style/TextAppearance.LL.Toolbar</item>
                     <item name="titleTextColor">@color/white</item>
                     <item name="android:background">?attr/colorSecondary</item>
                </style>
                
                <style name="TextAppearance.LL.Toolbar" parent="@style/TextAppearance.Widget.AppCompat.Toolbar.Title">
                     <item name="android:textStyle">bold</item>
                </style>
                

                并在您的应用主题中,指定工具栏样式:

                <item name="toolbarStyle">@style/Widget.LL.Toolbar</item>
                

                现在您可以保留指定工具栏的 xml 不变。很长一段时间以来,我都认为更改工具栏标题文本外观中的android:textColor 应该可以工作,但由于某种原因它没有。

                【讨论】:

                  【解决方案13】:
                  <?xml version="1.0" encoding="utf-8"?>
                  <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            xmlns:app="http://schemas.android.com/apk/res-auto">
                  
                  <android.support.v7.widget.Toolbar
                      android:id="@+id/toolbar"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      app:titleTextColor="@color/white"
                      android:background="@color/green" />
                  

                  【讨论】:

                    【解决方案14】:
                    public class MyToolbar extends android.support.v7.widget.Toolbar {
                    
                    public MyToolbar(Context context, @Nullable AttributeSet attrs) {
                        super(context, attrs);
                    }
                    
                    @Override
                    protected void onLayout(boolean changed, int l, int t, int r, int b) {
                        super.onLayout(changed, l, t, r, b);
                        AppCompatTextView textView = (AppCompatTextView) getChildAt(0);
                        if (textView!=null) textView.setTextAppearance(getContext(), R.style.TitleStyle);
                    }
                    

                    }

                    或从 MainActivity 简单使用:

                    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbarMain);
                    setSupportActionBar(toolbar);
                    ((AppCompatTextView) toolbar.getChildAt(0)).setTextAppearance(this, R.style.TitleStyle);
                    

                    style.xml

                    <style name="TileStyle" parent="TextAppearance.AppCompat">
                        <item name="android:textColor">@color/White</item>
                        <item name="android:shadowColor">@color/Black</item>
                        <item name="android:shadowDx">-1</item>
                        <item name="android:shadowDy">1</item>
                        <item name="android:shadowRadius">1</item>
                    </style>
                    

                    【讨论】:

                    • 虽然这段代码可以回答这个问题,但最好包含一些上下文,解释如何它是如何工作的以及何时 i> 使用它。从长远来看,纯代码的答案没有用处。
                    【解决方案15】:

                    请使用 toolbar.setTitleTextAppearance(context, R.style.TitleTextStyle);

                    //这是您可以自定义配色方案的样式

                     <style name="TitleTextStyle" parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title">
                        <item name="android:fontFamily">@string/you_font_family</item>
                        <item name="android:textStyle">normal</item>
                        <item name="android:textAppearance">@style/you_text_style</item>
                        <item name="android:textColor">#000000</item>
                        <item name="android:textSize">20sp</item>
                    </style>
                    

                    【讨论】:

                      【解决方案16】:

                      非常简单,这对我有用(标题和图标白色):

                          <android.support.v7.widget.Toolbar
                          android:id="@+id/toolbar"
                          android:layout_width="match_parent"
                          android:layout_height="56dp"
                          android:background="@color/PrimaryColor"
                          android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
                          app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
                          android:elevation="4dp" />
                      

                      【讨论】:

                        猜你喜欢
                        • 2017-04-22
                        • 2021-12-24
                        • 1970-01-01
                        • 2020-09-30
                        • 1970-01-01
                        • 2015-05-11
                        • 1970-01-01
                        • 2016-07-01
                        • 1970-01-01
                        相关资源
                        最近更新 更多