android - Text background issue on Toolbar -


when adding alpha toolbar background color, notice there background applied title's textview:

toolbar title background

here layout:

<framelayout xmlns:android="http://schemas.android.com/apk/res/android"          xmlns:tools="http://schemas.android.com/tools"          android:layout_width="match_parent"          android:layout_height="match_parent"          xmlns:app="http://schemas.android.com/apk/res-auto"          android:background="#0099cc">      <android.support.v7.widget.toolbar         android:id="@+id/toolbar"         android:layout_width="match_parent"         android:layout_height="?attr/actionbarsize"         app:theme="@style/fullscreenactionbarstyle"         app:titletextappearance="@style/actionbartitle"/>      <imageview         android:id="@+id/fullscreen_content"         android:layout_width="match_parent"         android:layout_height="match_parent"         android:src="@drawable/image"/>  </framelayout> 

and styles.xml:

<resources>     <!-- base application theme. -->     <style name="apptheme" parent="theme.appcompat.light.noactionbar">         <!-- customize theme here. -->         <item name="colorprimary">@color/colorprimary</item>         <item name="colorprimarydark">@color/colorprimarydark</item>         <item name="coloraccent">@color/coloraccent</item>          <item name="android:windowactionbar">false</item>         <item name="windowactionbar">false</item>     </style>      <style name="fullscreentheme" parent="apptheme">         <item name="android:windowbackground">@null</item>         <item name="metabuttonbarstyle">?android:attr/buttonbarstyle</item>         <item name="metabuttonbarbuttonstyle">?android:attr/buttonbarbuttonstyle</item>          <item name="android:actionbarstyle">@style/fullscreenactionbarstyle</item>         <item name="android:windowactionbaroverlay">true</item>         <!--for compatibility-->         <item name="actionbarstyle">@style/fullscreenactionbarstyle</item>         <item name="windowactionbaroverlay">true</item>     </style>      <style name="fullscreenactionbarstyle" parent="widget.appcompat.actionbar">         <item name="background">@color/black_overlay</item>         <item name="android:background">@color/black_overlay</item>     </style>      <style name="actionbartitle" parent="textappearance.widget.appcompat.toolbar.title">         <item name="android:textsize">50sp</item>     </style> </resources> 

"black_overlay" color value #66000000

i using appcompat , support libraries v24.2.1.

do have idea on how rid of text background?

cheers.

as can see in following issue, problem comes attribute app:theme. applied every view viewgroup inflate. replace app:theme style:

<android.support.v7.widget.toolbar     android:id="@+id/toolbar"     android:layout_width="match_parent"     android:layout_height="?attr/actionbarsize"     style="@style/fullscreenactionbarstyle"     app:titletextappearance="@style/actionbartitle"/> 

Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -