@@ -0,0 +1,1643 @@
+package me.lexjoy.widget.fill_drawable;%0A%0Aimport me.lexjoy.utils.ColorUtils;%0Aimport me.lexjoy.utils._assert.AssertUtils;%0A%0Aimport android.content.res.ColorStateList;%0Aimport android.content.res.Resources;%0Aimport android.graphics.drawable.StateListDrawable;%0A%0Apublic class FillStateListDrawable extends StateListDrawable %7B%0A%0A  public FillStateListDrawable(Resources resources) %7B%0A    AssertUtils.checkNotEmpty(resources, %22invalid resources%22);%0A    this.resources = resources;%0A  %7D%0A%0A  public FillStateListDrawable(Resources resources, int colorListId, int drawableId, boolean fitDark) %7B%0A    this(resources);%0A    FillDrawableFactory drawableHelper = new FillDrawableFactory(resources, drawableId);%0A%0A    ColorStateList colorStateList = resources.getColorStateList(colorListId);%0A    AssertUtils.checkNotEmpty(colorStateList, %22invalid color state list, id: %22 + colorListId);%0A%0A    int stateColor;%0A%0A    for (int%5B%5D state : StateList.COMMON_STATES) %7B%0A      stateColor = colorStateList.getColorForState(state, UNSET_COLOR);%0A%0A      if (stateColor == UNSET_COLOR) %7B%0A        continue;%0A      %7D%0A      this.addState(state, drawableHelper.getDrawable(stateColor, fitDark));%0A    %7D%0A  %7D%0A%0A  public FillStateListDrawable addState(int%5B%5D stateSet, int drawableId, int colorId) %7B%0A    return this.addState(stateSet, drawableId, colorId, true);%0A  %7D%0A%0A  public FillStateListDrawable addState(int%5B%5D stateSet, int drawableId, int colorId, boolean fitDark) %7B%0A    this.addState(stateSet, ColorUtils.fillByResources(this.resources, drawableId, colorId, fitDark));%0A    return this;%0A  %7D%0A%0A  private Resources resources;%0A%0A  private static final int UNSET_COLOR = 0x00000001;//#00 000001%0A%0A%7D%0A

Create FillStateListDrawable.java