package com.yyrh.ui.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import cn.yyxx.support.ResUtils;

/**
 * @author #Suyghur.
 * Created on 2021/10/19
 */
public class VerifyEditText extends LinearLayout {

    private ImageView leftImageView;
    private EditText editText;
    private TextView rightTextView;

    public VerifyEditText(Context context) {
        this(context, null);
    }

    public VerifyEditText(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public VerifyEditText(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        initView(context);
    }

    private void initView(Context context) {
        LayoutInflater.from(context).inflate(ResUtils.getResId(context, "hnyy_verify_edit_text", "layout"), this);

        leftImageView = findViewById(ResUtils.getResId(context, "hnyy_vet_iv_left", "id"));
        leftImageView.setVisibility(View.GONE);

        editText = findViewById(ResUtils.getResId(context, "hnyy_vet_input", "id"));

        rightTextView = findViewById(ResUtils.getResId(context, "hnyy_vet_tv_right", "id"));
        rightTextView.setVisibility(View.GONE);
    }

    public ImageView getLeftImageView() {
        return leftImageView;
    }

    public TextView getRightTextView() {
        return rightTextView;
    }

    public EditText getEditText() {
        return editText;
    }

}
