You can extend the standard NumberPicker in your custom CustomNumberPicker class for this:
public class CustomNumberPicker extends NumberPicker { public NumberPicker(Context context, AttributeSet attrs) { super(context, attrs); } @Override public void addView(View child) { super.addView(child); if(child instanceof EditText) { ((EditText) child).setTextSize(25); } } }
Now replace the current NumberPicker with xml with CustomNumberPicker :
<com.pkg.name.CustomNumberPicker android:id="@+id/number_picker" android:layout_width="match_parent" android:layout_height="wrap_content" />
source share