-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
Deregister v2 #18
Deregister v2 #18
Conversation
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.
awesome work!
beside from minor issue, it looks good to me.
private WeakReference<ViewTreeObserver.OnGlobalLayoutListener> mOnGlobalLayoutListenerWeakReference; | ||
|
||
public SimpleDeRegister(Activity activity, ViewTreeObserver.OnGlobalLayoutListener globalLayoutListener){ | ||
this.mActivityWeakReference = new WeakReference<Activity>(activity); |
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.
you don't need this
* on 28/02/2017 | ||
*/ | ||
|
||
public interface Deregister { |
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.
Any reason you prefer deregister
over unregister
?
I think Android people are more familiar with register - unregister
pair than register - deregister
(such as Context#registerReceiver
and Context#unregisterReceiver
).
Also, class/interface name should be noun.
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.
Even I was using unregister till I read this http://english.stackexchange.com/questions/25931/unregister-vs-deregister
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 we will go with the common usgea 'unregister'. Will update it with required changes
@@ -21,7 +21,7 @@ | |||
* @param activity Activity | |||
* @param listener KeyboardVisibilityEventListener | |||
*/ | |||
public static void setEventListener(final Activity activity, | |||
public static Deregister setEventListener(final Activity activity, |
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.
My bad, to meet the naming consistency, this should be renamed to registerEventListener
thanks! will release in a few days after some cleanup :) |
No description provided.