代码拉取完成,页面将自动刷新
自定义时间格式类型 适用于 界面内 弹框 等各种需要时间选择控件的界面
package ryan.datepicker;
import android.content.Context; import android.graphics.Color; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; import android.widget.EditText; import android.widget.NumberPicker;
/**
public class ChangeTextStyleNumberPicker extends NumberPicker {
public ChangeTextStyleNumberPicker(Context context) {
super(context);
}
public ChangeTextStyleNumberPicker(Context context, AttributeSet attrs) {
super(context, attrs);
}
public ChangeTextStyleNumberPicker(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
public void addView(View child) {
super.addView(child);
updateView(child);
}
@Override
public void addView(View child, ViewGroup.LayoutParams params) {
super.addView(child, params);
updateView(child);
}
@Override
public void addView(View child, int index, ViewGroup.LayoutParams params) {
super.addView(child, index, params);
updateView(child);
}
private void updateView(View view) {
if (view instanceof EditText) {
((EditText) view).setTextSize(16);
((EditText) view).setTextColor(Color.parseColor("#464c56")); //修改字体样式 } }}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。