Skip to content

ActionMode appcompat-v7 (icon and text colors problem after setting up Calligraphy) #120

Closed
@ferrannp

Description

@ferrannp

Hello!

I have a Toolbar set up and I am also using an action mode with my color accent as a background.

Toolbar:

<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="?attr/actionBarSize"
    android:background="?attr/colorPrimary"
    app:contentInsetEnd="0dp"
    app:contentInsetLeft="72dp"
    app:contentInsetRight="0dp"
    app:contentInsetStart="72dp"
    android:elevation="4dp"
    app:navigationIcon="?attr/homeAsUpIndicator"
    app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
    app:popupTheme="@style/ThemeOverlay.AppCompat.Light">
</android.support.v7.widget.Toolbar>

Theme:

<style name="AppBaseThemeMaterial" parent="Theme.AppCompat.Light">
...
    <item name="actionModeStyle">@style/AppBaseThemeMaterial.ActionMode</item>
</style>

<style name="AppBaseThemeMaterial.ActionMode" parent="@style/Widget.AppCompat.ActionMode">
    <item name="background">@color/colorAccent</item>
 </style>

What I used to see is:

screenshot_2015-01-26-00-48-07 2

But after setting up Calligraphy and using this into my main activity:

@Override
protected void attachBaseContext(Context newBase) {
    super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase));
}

I see it in this way:

screenshot_2015-01-26-00-44-55 2

Text is black instead of white... And I only see the back arrow when pressing on it (it is the same color as the bar now!). Any ideas on why is this happening? Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions