MaterialEditTextPreference.java 文件源码

java
阅读 21 收藏 0 点赞 0 评论 0

项目:GitHub 作者:
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);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号