Skip to content

当底色本来就是纯白#FFFFFF时 任何切换回纯白的操作都失效 但是改成#FFFFFE没问题  #41

Open

Description

@hazyrain

这个操作包括removeanyskin() 没时间看源码了 先拿#FFFFFE凑活

Activity

  1. yilylong commented on Dec 29, 2017

    @yilylong

    同上 遇见这个bug了只要颜色设置成了白色 ResourceManager. getColor() 就会返回-1 Resources.NotFoundException 郁闷了好久

  2. yilylong commented on Dec 29, 2017

    @yilylong

    发现问题了 Color.WHITE public static final int WHITE = 0xFFFFFFFF; 好像就是-1;
    BACKGROUD("background") {
    @OverRide
    public void apply(View view, String resName) {
    Drawable drawable = getResourceManager().getDrawableByName(resName);
    if (null!=drawable){
    view.setBackgroundDrawable(drawable);
    }else{
    int color = getResourceManager().getColor(resName);
    if(color==-1){
    return ;
    }
    view.setBackgroundColor(color);
    }
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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