Closed ehsan1010ed closed 5 years ago
Is there a way to change TypeFace of this control?
public class CustomPinEditText extends PinEntryEditText {
public CustomPinEditText(Context context) {
super(context);
mCharPaint.setTypeface(TastlyApplication.nexaBold);
mSingleCharPaint.setTypeface(TastlyApplication.nexaBold);
mLastCharPaint.setTypeface(TastlyApplication.nexaBold);
}
public CustomPinEditText(Context context, AttributeSet attrs) {
super(context, attrs);
mCharPaint.setTypeface(TastlyApplication.nexaBold);
mSingleCharPaint.setTypeface(TastlyApplication.nexaBold);
mLastCharPaint.setTypeface(TastlyApplication.nexaBold);
}
public CustomPinEditText(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
mCharPaint.setTypeface(TastlyApplication.nexaBold);
mSingleCharPaint.setTypeface(TastlyApplication.nexaBold);
mLastCharPaint.setTypeface(TastlyApplication.nexaBold);
}
public CustomPinEditText(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
mCharPaint.setTypeface(TastlyApplication.nexaBold);
mSingleCharPaint.setTypeface(TastlyApplication.nexaBold);
mLastCharPaint.setTypeface(TastlyApplication.nexaBold);
}
}
Here if somebody needs an immediate fix. But dev should fix this properly definitely.
This feature was added, both fontFamily and setTypeface are now supported. There is an example in the sample app on how to do this.
we couldn't set a typeface for number pinEntryEditText?