File tree Expand file tree Collapse file tree
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package com .beardedhen .androidbootstrap ;
22
33import android .content .Context ;
4- import android .content .DialogInterface ;
54import android .content .res .TypedArray ;
65import android .graphics .drawable .Drawable ;
76import android .os .Bundle ;
109import android .support .annotation .Nullable ;
1110import android .util .AttributeSet ;
1211import android .view .MotionEvent ;
13- import android .view .View ;
1412import android .view .ViewParent ;
1513
1614import com .beardedhen .androidbootstrap .api .attributes .BootstrapBrand ;
@@ -221,17 +219,12 @@ public void setSelected(boolean selected) {
221219
222220 private boolean handleRadioEvent (@ NonNull MotionEvent event ) {
223221 if (event .getAction () == MotionEvent .ACTION_DOWN ) {
224- if (isSelected ()) {
225- setSelected (false );
226- }
227- else { // notify parent to deselect any peers
228- setSelected (true );
222+ setSelected (true ); // notify parent to deselect any peers
229223
230- ViewParent parent = getParent ();
224+ ViewParent parent = getParent ();
231225
232- if (parent instanceof BootstrapButtonGroup ) {
233- ((BootstrapButtonGroup ) parent ).onRadioToggle (parentIndex );
234- }
226+ if (parent instanceof BootstrapButtonGroup ) {
227+ ((BootstrapButtonGroup ) parent ).onRadioToggle (parentIndex );
235228 }
236229 return true ;
237230 }
You can’t perform that action at this time.
0 commit comments