private void init(Context context, AttributeSet attrs) {
PrefUtil.setLayoutResource(context, this, attrs);
int fallback;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
fallback = DialogUtils.resolveColor(context, android.R.attr.colorAccent);
} else {
fallback = 0;
}
fallback = DialogUtils.resolveColor(context, R.attr.colorAccent, fallback);
color = DialogUtils.resolveColor(context, R.attr.md_widget_color, fallback);
editText = new AppCompatEditText(context, attrs);
// Give it an ID so it can be saved/restored
editText.setId(android.R.id.edit);
editText.setEnabled(true);
}
MaterialEditTextPreference.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:material-dialogs
作者:
评论列表
文章目录