@@ -0,0 +1,2980 @@
+package com.camnter.newlife.widget;%0A%0Aimport android.app.Dialog;%0Aimport android.content.Context;%0Aimport android.graphics.drawable.Drawable;%0Aimport android.view.View;%0Aimport android.widget.TextView;%0A%0Aimport com.camnter.newlife.R;%0A%0A/**%0A * Description%EF%BC%9ACustomDialog%0A * Created by%EF%BC%9ACaMnter%0A * Time%EF%BC%9A2015-12-10 14:38%0A */%0Apublic class SendDiscussDialog extends Dialog %7B%0A%0A    private TextView caseTV;%0A    private TextView helpTV;%0A%0A    public SendDiscussDialog(Context context) %7B%0A        super(context, R.style.send_discuss_dialog);%0A        this.initViews(context);%0A    %7D%0A%0A    /**%0A     * Creates a dialog window that uses a custom dialog style.%0A     * %3Cp/%3E%0A     * The supplied %7B@code context%7D is used to obtain the window manager and%0A     * base theme used to present the dialog.%0A     * %3Cp/%3E%0A     * The supplied %7B@code theme%7D is applied on top of the context's theme. See%0A     * %3Ca href=%22%7B@docRoot%7Dguide/topics/resources/available-resources.html#stylesandthemes%22%3E%0A     * Style and Theme Resources%3C/a%3E for more information about defining and%0A     * using styles.%0A     *%0A     * @param context    the context in which the dialog should run%0A     * @param themeResId a style resource describing the theme to use for the%0A     *                   window, or %7B@code 0%7D to use the default dialog theme%0A     */%0A    public SendDiscussDialog(Context context, int themeResId) %7B%0A        super(context, themeResId);%0A        this.initViews(context);%0A    %7D%0A%0A    public SendDiscussDialog(Context context, boolean cancelable, OnCancelListener cancelListener) %7B%0A        super(context, cancelable, cancelListener);%0A        this.initViews(context);%0A    %7D%0A%0A    private void initViews(Context context) %7B%0A        this.setContentView(R.layout.dialog_send_discuss);%0A        this.caseTV = (TextView) this.findViewById(R.id.dialog_send_discuss_case_tv);%0A        this.helpTV = (TextView) this.findViewById(R.id.dialog_send_discuss_help_tv);%0A    %7D%0A%0A%0A    public void setTextDrawable(Drawable drawable) %7B%0A        if (drawable == null) return;%0A        drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());%0A    %7D%0A%0A    public static class DialogBuilder %7B%0A%0A        private SendDiscussDialog dialog;%0A        public static DialogBuilder ourInstance;%0A%0A        public static DialogBuilder getInstance(Context context) %7B%0A            if (ourInstance == null) ourInstance = new DialogBuilder(context);%0A            return ourInstance;%0A        %7D%0A%0A        private DialogBuilder(Context context) %7B%0A            this.dialog = new SendDiscussDialog(context);%0A        %7D%0A%0A        public DialogBuilder setCaseListenser(View.OnClickListener listener) %7B%0A            this.dialog.caseTV.setOnClickListener(listener);%0A            return this;%0A        %7D%0A%0A        public DialogBuilder setHelpListener(View.OnClickListener listener) %7B%0A            this.dialog.helpTV.setOnClickListener(listener);%0A            return this;%0A        %7D%0A%0A        public SendDiscussDialog getDialog() %7B%0A            return dialog;%0A        %7D%0A%0A    %7D%0A%0A%7D

add SendDiscussDialog