BindingAdapters: Create an adapter for textStyle
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
eb43e49a95
commit
a5e2c1c1b3
@ -3,7 +3,10 @@ package com.wireguard.android;
|
||||
import android.databinding.BindingAdapter;
|
||||
import android.databinding.ObservableArrayMap;
|
||||
import android.databinding.ObservableList;
|
||||
import android.graphics.Typeface;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
/**
|
||||
* Static methods for use by generated code in the Android data binding library.
|
||||
@ -64,6 +67,11 @@ public final class BindingAdapters {
|
||||
}
|
||||
}
|
||||
|
||||
@BindingAdapter({"android:textStyle"})
|
||||
public static void textStyleBinding(final TextView view, final Typeface typeface) {
|
||||
view.setTypeface(typeface);
|
||||
}
|
||||
|
||||
private BindingAdapters() {
|
||||
// Prevent instantiation.
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user