Search in sources :

Example 1 with MatchTextView

use of com.marshalchen.common.uimodule.matchview.MatchTextView in project UltimateAndroid by cymcsg.

the class MatchDialog method onCreateDialog.

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    if (mDialog == null) {
        mDialog = new Dialog(getActivity(), R.style.match_view_dialog);
        mDialog.setContentView(R.layout.match_view_dialog_match);
        mDialog.setCanceledOnTouchOutside(true);
        mDialog.getWindow().setGravity(Gravity.CENTER);
        View view = mDialog.getWindow().getDecorView();
        matchTextView = (MatchTextView) view.findViewById(R.id.mTextView);
        matchTextView.setMatchOutListener(new MatchView.MatchOutListener() {

            @Override
            public void onBegin() {
            }

            @Override
            public void onProgressUpdate(float progress) {
            }

            @Override
            public void onFinish() {
                MatchDialog.super.onStop();
            }
        });
        mMatchButton = (MatchButton) view.findViewById(R.id.mButton);
        mMatchButton.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                mMatchButton.hide();
                matchTextView.hide();
            }
        });
    }
    return mDialog;
}
Also used : Dialog(android.app.Dialog) MatchView(com.marshalchen.common.uimodule.matchview.util.MatchView) MatchTextView(com.marshalchen.common.uimodule.matchview.MatchTextView) MatchView(com.marshalchen.common.uimodule.matchview.util.MatchView) View(android.view.View)

Aggregations

Dialog (android.app.Dialog)1 View (android.view.View)1 MatchTextView (com.marshalchen.common.uimodule.matchview.MatchTextView)1 MatchView (com.marshalchen.common.uimodule.matchview.util.MatchView)1