package com.dskj.trustlend.dialog;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.text.TextUtils;
import android.text.method.LinkMovementMethod;
import android.view.Gravity;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.azhon.basic.utils.AnimUtil;
import com.dskj.trustlend.R;

public class FaqsDialog extends Dialog {
    protected TextView mRightBtn;
    private CharSequence mRightText = null;
    private View.OnClickListener mRightListener;

    public FaqsDialog(Context context) {
        super(context, R.style.MaterialDesignDialog);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dialog_delete_dub);


        mRightBtn = findViewById(R.id.right_btn);
        if (mRightListener != null) {
            mRightBtn.setOnClickListener(mRightListener);
        }

        AnimUtil.setAnimView(mRightBtn);

        Window window = getWindow();
        WindowManager.LayoutParams wlp = window.getAttributes();
        wlp.gravity = Gravity.CENTER;
        wlp.width = WindowManager.LayoutParams.WRAP_CONTENT;
        wlp.height = WindowManager.LayoutParams.WRAP_CONTENT;


        window.setAttributes(wlp);
    }


    public void setRightButton(View.OnClickListener listener) {
        mRightListener = listener;
    }
}
