-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added keylistner to KProgresshud #37
base: master
Are you sure you want to change the base?
Conversation
@@ -37,6 +37,7 @@ android { | |||
dependencies { | |||
compile fileTree(dir: 'libs', include: ['*.jar']) | |||
testCompile 'junit:junit:4.12' | |||
compile 'org.jetbrains:annotations-java5:15.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using this type of annotation is generally good for the IDE to spot bugs and output some warnings.
But in this case I think it not so important to add a lib just for a single @nullable. Which IMHO, can be omitted without any problems.
public void setOnKeyListener(OnKeyListener onKeyListener) { | ||
super.setOnKeyListener(onKeyListener); | ||
mOnKeyListener = onKeyListener; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it not necessary to override this method, then save the reference which I don't see being call anywhere.
* @return Current HUD | ||
*/ | ||
public KProgressHUD setOnKeyListener(@Nullable DialogInterface.OnKeyListener onKeyListener) { | ||
this.mProgressDialog.setOnKeyListener(onKeyListener); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just this is nice. You don't need to make any changes inside dialog class (I commented below).
Sorry for late reply. Your PR and the docs-reformatting is welcome. |
But I am using your library and in certain activity I need to set key
*setOnKeyListener.*
…On Fri, Apr 20, 2018 at 9:05 PM Nguyễn Anh Tuấn ***@***.***> wrote:
Sorry for the late reply. Thank for the PR and the docs-reformatting.
I have left some comments, take a look when you have time and update the
PR if neccesary.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#37 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ARPSunVfMkV_TsYMkbBXNmksJdWLwPioks5tqgAlgaJpZM4RWXR7>
.
--
Thanks & Regards,
*Mr. Upendra Shah.*
|
Added keylistner for doing custom on back press key and other keys too