<commit_before>package com.camnter.newlife.widget;

import android.app.Activity;
import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.camnter.newlife.R;

/**
 * Description：TopicFieldPopWindow
 * Created by：CaMnter
 * Time：2015-12-11 11:31
 */
public class CustomPopupWindow extends android.widget.PopupWindow {

    private Activity activity;

    private View popupWindowView;

    public CustomPopupWindow(Activity activity) {
        super(activity);
        this.activity = activity;
        this.initPopupWindow();
    }

    private void initPopupWindow() {
        LayoutInflater inflater = (LayoutInflater) activity
                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        this.popupWindowView = inflater.inflate(R.layout.popupwindow_topic_field, null);
        setContentView(popupWindowView);
        //设置弹出窗体的宽
        this.setWidth(ViewGroup.LayoutParams.MATCH_PARENT);
        //设置弹出窗体的高
        this.setHeight(ViewGroup.LayoutParams.MATCH_PARENT);
        //设置弹出窗体可点击
        setTouchable(true);
        setFocusable(true);
        //
        setOutsideTouchable(true);

        //设置弹出窗体动画效果
        // this.setAnimationStyle(R.style.AnimBottom);
        //实例化一个ColorDrawable颜色为半透明
        ColorDrawable drawable = new ColorDrawable(0x4f000000);
        //设置弹出窗体的背景
        this.setBackgroundDrawable(drawable);
    }


    public static class PopupWindowBuilder {
        private CustomPopupWindow popupWindow;
        public static PopupWindowBuilder ourInstance;

        public static PopupWindowBuilder getInstance(Activity activity) {
            if (ourInstance == null) ourInstance = new PopupWindowBuilder(activity);
            return ourInstance;
        }

        private PopupWindowBuilder(Activity activity) {
            this.popupWindow = new CustomPopupWindow(activity);
        }

        public CustomPopupWindow getPopupWindow() {
            return this.popupWindow;
        }

    }


}<commit_msg>update CustomPopupWindow<commit_after>package com.camnter.newlife.widget;

import android.app.Activity;
import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.camnter.newlife.R;

/**
 * Description：TopicFieldPopWindow
 * Created by：CaMnter
 * Time：2015-12-11 11:31
 */
public class CustomPopupWindow extends android.widget.PopupWindow {

    private Activity activity;

    private View popupWindowView;

    public CustomPopupWindow(Activity activity) {
        super(activity);
        this.activity = activity;
        this.initPopupWindow();
    }

    private void initPopupWindow() {
        LayoutInflater inflater = (LayoutInflater) activity
                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        this.popupWindowView = inflater.inflate(R.layout.popupwindow_topic_field, null);
        setContentView(popupWindowView);
        //设置弹出窗体的宽
        this.setWidth(ViewGroup.LayoutParams.MATCH_PARENT);
        //设置弹出窗体的高
        this.setHeight(ViewGroup.LayoutParams.MATCH_PARENT);
        //设置弹出窗体可点击
        setTouchable(true);
        setFocusable(true);
        //
        setOutsideTouchable(true);

        //设置弹出窗体动画效果
        // this.setAnimationStyle(R.style.AnimBottom);
        this.setAnimationStyle(R.style.);
        //实例化一个ColorDrawable颜色为半透明
        ColorDrawable drawable = new ColorDrawable(0x4f000000);
        //设置弹出窗体的背景
        this.setBackgroundDrawable(drawable);
    }


    public static class PopupWindowBuilder {
        private static CustomPopupWindow popupWindow;
        public static PopupWindowBuilder ourInstance;

        public static PopupWindowBuilder getInstance(Activity activity) {
            if (ourInstance == null) ourInstance = new PopupWindowBuilder(activity);
            popupWindow = new CustomPopupWindow(activity);
            return ourInstance;
        }

        private PopupWindowBuilder(Activity activity) {

        }

        public CustomPopupWindow getPopupWindow() {
            return popupWindow;
        }

    }


}
{'fraction_non_alphanumeric': 0.08189349112426035, 'fraction_numerical': 0.009467455621301775, 'mean_word_length': 2.86996336996337, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4154210', 'n_tokens_mistral': 1257, 'n_tokens_neox': 1240, 'n_words': 209}