Skip to content

Commit

Permalink
Fix extends
Browse files Browse the repository at this point in the history
  • Loading branch information
S64 committed Aug 30, 2017
1 parent 7cc6e16 commit 7fb6a4f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
Expand Up @@ -213,7 +213,9 @@ public interface OnCheckedChangeListener {
}

private class CheckedStateTracker implements CompoundFrameLayout.OnCheckedChangeListener {
public void onCheckedChanged(CompoundFrameLayout buttonView, boolean isChecked) {

@Override
public void onCheckedChanged(NonClickableCompoundFrameLayout buttonView, boolean isChecked) {
if (mProtectFromCheckedChange) {
return;
}
Expand All @@ -227,6 +229,7 @@ public void onCheckedChanged(CompoundFrameLayout buttonView, boolean isChecked)
int id = buttonView.getId();
setCheckedId(isChecked ? id : View.NO_ID);
}

}

private class PassThroughHierarchyChangeListener implements
Expand Down
Expand Up @@ -77,8 +77,8 @@ protected boolean init(@NonNull Context context, @Nullable AttributeSet attrs, @
);

try {
setChecked(a.getBoolean(R.styleable.CompoundFrameLayout_checked, false));
setClickable(a.getBoolean(R.styleable.CompoundFrameLayout_clickable, true));
setChecked(a.getBoolean(R.styleable.NonClickableCompoundFrameLayout_checked, false));
setClickable(a.getBoolean(R.styleable.NonClickableCompoundFrameLayout_clickable, true));
} finally {
a.recycle();
}
Expand Down
3 changes: 1 addition & 2 deletions core/src/main/res/values/attrs.xml
Expand Up @@ -7,8 +7,7 @@
</declare-styleable>

<declare-styleable name="CompoundFrameLayout">
<attr name="checked" format="boolean" />
<attr name="clickable" format="boolean" />
<!-- default -->
</declare-styleable>

<declare-styleable name="CompoundFrameLayoutRadioGroup">
Expand Down
Expand Up @@ -25,6 +25,7 @@
import java.util.UUID;

import jp.s64.android.radiobuttonextended.core.widget.CompoundFrameLayout;
import jp.s64.android.radiobuttonextended.core.widget.NonClickableCompoundFrameLayout;
import jp.s64.android.radiobuttonextended.core.widget.RadioFrameLayout;
import jp.s64.android.radiobuttonextended.example.R;
import jp.s64.android.radiobuttonextended.recycler.adapter.IOnCheckedChangeListener;
Expand Down Expand Up @@ -68,7 +69,7 @@ public void setCheckedChangeListener(final IOnCheckedChangeListener<SecondViewHo
mRadioLayout.setOnCheckedChangeListener(new CompoundFrameLayout.OnCheckedChangeListener() {

@Override
public void onCheckedChanged(CompoundFrameLayout compoundFrameLayout, boolean checked) {
public void onCheckedChanged(NonClickableCompoundFrameLayout compoundFrameLayout, boolean checked) {
listener.onCheckedChange(SecondViewHolder.this, compoundFrameLayout, checked);
}

Expand Down

0 comments on commit 7fb6a4f

Please sign in to comment.