@@ -0,0 +1,2076 @@
+/*%0A * Copyright (c) Facebook, Inc. and its affiliates.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage com.facebook.litho.widget;%0A%0Aimport android.content.res.ColorStateList;%0Aimport androidx.annotation.ColorInt;%0Aimport androidx.annotation.Nullable;%0Aimport java.util.Arrays;%0A%0A/**%0A * A %7B@link ColorStateList%7D for %7B@link EditText%7D properties that provides an %7B@code equals(..)%7D%0A * method so that it can be used %7B@code MaterialTextInput.textColorStateList(..)%7D.%0A */%0Apublic class MaterialTextInputColorStateList extends ColorStateList %7B%0A%0A  private static final int%5B%5D%5B%5D STATES =%0A      new int%5B%5D%5B%5D %7B%0A        new int%5B%5D %7Bandroid.R.attr.state_enabled%7D,%0A        new int%5B%5D %7Bandroid.R.attr.state_pressed%7D,%0A        new int%5B%5D %7B-android.R.attr.state_enabled%7D,%0A      %7D;%0A%0A  int%5B%5D colors;%0A%0A  public static MaterialTextInputColorStateList create(%0A      @ColorInt int enabled, @ColorInt int pressed, @ColorInt int disabled) %7B%0A    @ColorInt int%5B%5D colors = new int%5B%5D %7Benabled, pressed, disabled%7D;%0A    return new MaterialTextInputColorStateList(colors);%0A  %7D%0A%0A  private MaterialTextInputColorStateList(@ColorInt int%5B%5D colors) %7B%0A    super(STATES, colors);%0A    this.colors = colors;%0A  %7D%0A%0A  @Override%0A  public boolean equals(@Nullable Object o) %7B%0A    if (this == o) %7B%0A      return true;%0A    %7D%0A    if (o == null %7C%7C getClass() != o.getClass()) %7B%0A      return false;%0A    %7D%0A    MaterialTextInputColorStateList that = (MaterialTextInputColorStateList) o;%0A    return Arrays.equals(colors, that.colors);%0A  %7D%0A%0A  @Override%0A  public int hashCode() %7B%0A    return Arrays.hashCode(colors);%0A  %7D%0A%7D%0A

Add a custom ColorStateList for use with MaterialTextInputSpec