package com.mytatvarnsdk.myView.popupwindow;

import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.PopupWindow;
import android.widget.TextView;

import com.mytatvarnsdk.R;


public class ErrorInfoPop extends PopupWindow {

    public ErrorInfoPop(Context mContext) {
        super(mContext);
        View mView = LayoutInflater.from(mContext).inflate(R.layout.pop_error_info, null);

        setWidth((int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 250, mContext.getResources().getDisplayMetrics()));
        setFocusable(true);
        setOutsideTouchable(true);
        setTouchable(true);
        setBackgroundDrawable(new ColorDrawable(0x00000000));//设置背景
        ((TextView) mView.findViewById(R.id.error_info)).setText(mContext.getString(R.string.show_error_info));
        setContentView(mView);
    }
}
