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

fix https://github.com/CymChad/BaseRecyclerViewAdapterHelper/issues/919 #924

Merged
merged 1 commit into from
Mar 27, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,10 @@ public BaseViewHolder setOnClickListener(int viewId, View.OnClickListener listen
public BaseViewHolder addOnClickListener(final int viewId) {
childClickViewIds.add(viewId);
final View view = getView(viewId);
if (!view.isClickable()) {
view.setClickable(true);
}
if (view != null) {
if (!view.isClickable()) {
view.setClickable(true);
}
view.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Expand Down Expand Up @@ -395,10 +395,10 @@ public BaseViewHolder setNestView(int viewId) {
public BaseViewHolder addOnLongClickListener(final int viewId) {
itemChildLongClickViewIds.add(viewId);
final View view = getView(viewId);
if (!view.isLongClickable()) {
view.setLongClickable(true);
}
if (view != null) {
if (!view.isLongClickable()) {
view.setLongClickable(true);
}
view.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
Expand All @@ -409,7 +409,6 @@ public boolean onLongClick(View v) {
}
});
}

return this;
}

Expand Down