Skip to content

Commit

Permalink
增加dialog getOwerActivity的设置
Browse files Browse the repository at this point in the history
  • Loading branch information
yilylong committed Aug 29, 2017
1 parent 909a60c commit 6269eec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.zhl.cbdialog;

import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.os.CountDownTimer;
Expand Down Expand Up @@ -532,6 +533,9 @@ public void onFinish() {
}
}.start();
}
if(context instanceof Activity){
dialog.setOwnerActivity((Activity) context);
}
return dialog;
}

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down

0 comments on commit 6269eec

Please sign in to comment.