BindingAdapters: Sort existing adapters

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Samuel Holland 2017-10-29 05:06:36 -05:00
parent 50a7a12de2
commit 3233855630

View File

@ -17,6 +17,11 @@ import com.wireguard.android.R;
@SuppressWarnings("unused") @SuppressWarnings("unused")
public final class BindingAdapters { public final class BindingAdapters {
@BindingAdapter({"filter"})
public static void setFilter(final TextView view, final InputFilter filter) {
view.setFilters(new InputFilter[]{filter});
}
@BindingAdapter({"items", "layout"}) @BindingAdapter({"items", "layout"})
public static <T> void setItems(final LinearLayout view, public static <T> void setItems(final LinearLayout view,
final ObservableList<T> oldList, final int oldLayoutId, final ObservableList<T> oldList, final int oldLayoutId,
@ -94,11 +99,6 @@ public final class BindingAdapters {
adapter.setMap(newMap); adapter.setMap(newMap);
} }
@BindingAdapter({"filter"})
public static void setFilter(final TextView view, final InputFilter filter) {
view.setFilters(new InputFilter[]{filter});
}
@BindingAdapter({"android:textStyle"}) @BindingAdapter({"android:textStyle"})
public static void setTextStyle(final TextView view, final Typeface typeface) { public static void setTextStyle(final TextView view, final Typeface typeface) {
view.setTypeface(typeface); view.setTypeface(typeface);