package com.jld.vod.view.widget;

import android.annotation.SuppressLint;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.view.Window;
import android.view.WindowManager;
import android.widget.TextView;

import com.jld.vod.R;
import com.jld.vod.config.Config;
import com.jld.vod.model.bean.Datas;
import com.youth.banner.Banner;
import com.youth.banner.BannerConfig;

import java.util.ArrayList;
import java.util.List;

public class CustomBlackBgDialog
        extends Dialog
{

    //private ImageView mCloseImg;
    private TextView auto_ms_text;
    private Banner mBanner;
    private List<String> list = new ArrayList<>();
    private Context mContext;
    public OnClickBottomListener onClickBottomListener;


    public CustomBlackBgDialog(Context paramContext)
    {
        super(paramContext, R.style.MyDialog);
        this.mContext = paramContext;


    }

    @Override
    public void dismiss() {
        super.dismiss();
    }

    private void initEvent()
    {

    }

    @SuppressLint("WrongConstant")
    private void refreshView()
    {

//        if (!TextUtils.isEmpty(this.tv_ok)) {
//            this.mBtnOk.setText(this.tv_ok);
//        }
//        if (!TextUtils.isEmpty(this.tv_no)) {
//            this.mBtnNo.setText(this.tv_no);
//        }
//        Button localButton = this.mBtnNo;
//        if (this.visiable) {}
//        for (int i = 0;; i = 8)
//        {
//            localButton.setVisibility(i);
//            if (!TextUtils.isEmpty(this.tv_cus))
//            {
//                this.mBtnCus.setText(this.tv_cus);
//                this.mBtnCus.setVisibility(View.VISIBLE);
//            }
//            return;
//        }
    }

    protected void onCreate(Bundle paramBundle)
    {
        super.onCreate(paramBundle);
        setContentView(R.layout.custom_geo_black_dialog);
        setCanceledOnTouchOutside(false);
        Window w = getWindow();
//        int width = 850;
//        int height = 600;
//        w.setLayout(width,height);
        w.setGravity(17);
        WindowManager.LayoutParams localLayoutParams = w.getAttributes();

        localLayoutParams.height = WindowManager.LayoutParams.MATCH_PARENT;
        localLayoutParams.width = WindowManager.LayoutParams.MATCH_PARENT;

        w.setWindowAnimations(R.style.AnimationDialog);
        w.setAttributes(localLayoutParams);

        //initView();
        refreshView();
        initEvent();
    }


    public CustomBlackBgDialog setOnClickBottomListener(OnClickBottomListener paramOnClickBottomListener)
    {
        this.onClickBottomListener = paramOnClickBottomListener;
        return this;
    }


    public static abstract interface OnClickBottomListener
    {
        public abstract void onBtnCloseClick();
    }
}