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 cn.yyxx.support.ResUtils;

/**
 * @author #Suyghur.
 * Created on 2021/05/11
 */
public class EventEditText extends LinearLayout {

    private ImageView leftImageView;
    private ImageView rightImageView;
    private EditText editText;

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

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

    public EventEditText(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_event_edit_text", "layout"), this);

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

        rightImageView = findViewById(ResUtils.getResId(context, "hnyy_eet_iv_right", "id"));
        rightImageView.setVisibility(View.GONE);

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

    public ImageView getLeftImageView() {
        return leftImageView;
    }

    public ImageView getRightImageView() {
        return rightImageView;
    }

    public EditText getEditText() {
        return editText;
    }

}
