private void init(AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        if (attrs == null)
            return;

        // Get the super padding top
        mTruePaddingTop = super.getPaddingTop();

        final Context context = getContext();
        final Resources resources = getResources();

        TypedArray a = context.obtainStyledAttributes(
                attrs, R.styleable.EditText, defStyleAttr, defStyleRes);

        String fontFile = a.getString(R.styleable.EditText_gFont);
        int lineSize = a.getDimensionPixelSize(R.styleable.EditText_gLineSize, resources.getDimensionPixelSize(R.dimen.g_editText_lineSize));
        ColorStateList lineColor = a.getColorStateList(R.styleable.EditText_gLineColor);

        // Set HintProperty
        int titleModel = a.getInt(R.styleable.EditText_gHintTitle, 1);
        int titleTextSize = a.getDimensionPixelSize(R.styleable.EditText_gHintTitleTextSize, resources.getDimensionPixelSize(R.dimen.g_editText_hintTitleTextSize));
        int titlePaddingTop = a.getDimensionPixelSize(R.styleable.EditText_gHintTitlePaddingTop, 0);
        int titlePaddingBottom = a.getDimensionPixelSize(R.styleable.EditText_gHintTitlePaddingBottom, 0);
        int titlePaddingLeft = a.getDimensionPixelSize(R.styleable.EditText_gHintTitlePaddingLeft, 0);
        int titlePaddingRight = a.getDimensionPixelSize(R.styleable.EditText_gHintTitlePaddingRight, 0);

        a.recycle();

        // Init color
        if (lineColor == null) {
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
                lineColor = resources.getColorStateList(R.color.g_default_edit_view_line, null);
            } else {
                //noinspection deprecation
                lineColor = resources.getColorStateList(R.color.g_default_edit_view_line);
            }
        }

        if (!Ui.isHaveAttribute(attrs, "textColorHint") || getHintTextColors() == null) {
            ColorStateList hintColor;
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
                hintColor = resources.getColorStateList(R.color.g_default_edit_view_hint, null);
            } else {
                //noinspection deprecation
                hintColor = resources.getColorStateList(R.color.g_default_edit_view_hint);
            }
            setHintTextColor(hintColor);
        }

        // Set same values
        setLineSize(lineSize);
        setLineColor(lineColor);

        setHintTitleTextSize(titleTextSize);
        setHintTitleModel(titleModel);

        // check for IDE preview render
        if (!this.isInEditMode()) {
            // Set Font
            if (fontFile != null && fontFile.length() > 0) {
                Typeface typeface = Ui.getFont(context, fontFile);
                if (typeface != null) setTypeface(typeface);
            }
        }

        // Init background and title
        if (!Ui.isHaveAttribute(attrs, "background")) {
            initBackground();
        }

        initHintTitleText();

        // SetHintPadding
        setHintTitlePadding(titlePaddingLeft, titlePaddingTop, titlePaddingRight, titlePaddingBottom);
    }
EditText
This have a title from hint
<p>
<p><strong>XML attributes</strong></p>
<p>
See {@link net.qiujuer.genius.ui.R.styleable#EditText_gFont Attributes},
{@link net.qiujuer.genius.ui.R.styleable#EditText_gHintTitle Attributes},
{@link net.qiujuer.genius.ui.R.styleable#EditText_gHintTitlePaddingBottom Attributes}
{@link net.qiujuer.genius.ui.R.styleable#EditText_gHintTitlePaddingLeft Attributes}
{@link net.qiujuer.genius.ui.R.styleable#EditText_gHintTitlePaddingRight Attributes}
{@link net.qiujuer.genius.ui.R.styleable#EditText_gHintTitlePaddingTop Attributes}
{@link net.qiujuer.genius.ui.R.styleable#EditText_gHintTitleTextSize Attributes}
{@link net.qiujuer.genius.ui.R.styleable#EditText_gLineColor Attributes}
{@link net.qiujuer.genius.ui.R.styleable#EditText_gLineSize Attributes}
caprice/ui/src/main/java/net/qiujuer/genius/ui/widget/EditText.java