Skip to content
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

Feature - Title click listener #512

Merged
merged 5 commits into from
Feb 15, 2017

Conversation

quentin41500
Copy link
Member

  • Provide title click listener option for MCV

@prolificinteractive/android-devs

*/
public void setOnTitleClickListener(final OnClickListener listener) {
if (listener != null) {
title.setOnClickListener(listener);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's wrong with setting the listener to null if it should already be guarding for null listeners

widget.setOnTitleClickListener(new View.OnClickListener() {
@Override
public void onClick(final View view) {
Toast.makeText(DynamicSettersActivity.this, "Today is the day", Toast.LENGTH_SHORT)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

string resources? or does it not matter

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -222,7 +222,7 @@ public void onPageScrolled(int position, float positionOffset, int positionOffse
private OnDateSelectedListener listener;
private OnMonthChangedListener monthListener;
private OnRangeSelectedListener rangeListener;

private OnClickListener titleListener;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this being used?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope

*/
public void setOnTitleClickListener(final OnClickListener listener) {
if (listener != null) {
title.setOnClickListener(listener);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there something wrong with setting anull click listener?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually no, that's how you remove it! I will cleanup, thanks

@quentin41500
Copy link
Member Author

@tiensi Updated following comments

@quentin41500 quentin41500 merged commit 30da68b into future-1.x Feb 15, 2017
@quentin41500 quentin41500 deleted the qc_feature_title_click_listener branch February 15, 2017 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants