package com.bokecc.livemodule.view.redpacket;

import android.content.Context;
import androidx.annotation.Nullable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.bokecc.dwlivedemo.R;

/**
 * 视频加载中View
 */
public class RedPacketAnimView extends RelativeLayout {

    private ImageView imageView;
    private TextView mTime;

    public RedPacketAnimView(Context context) {
        super(context);
        initView(context);
    }

    public RedPacketAnimView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        initView(context);
    }

    public RedPacketAnimView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        initView(context);
    }

    private void initView(Context context) {
        LayoutInflater.from(context).inflate(R.layout.redpacket_anim_view, this);
        imageView = findViewById(R.id.gif);
        mTime = findViewById(R.id.red_packet_start_time);
    }

    public ImageView getImageView() {
        return imageView;
    }

    public TextView getTime() {
        return mTime;
    }
}
