Skip to content

Commit f3fea11

Browse files
committed
Fixed a spelling error for mSecondaryOpenListener; deprecated old setter
1 parent 4254fec commit f3fea11

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

library/src/com/jeremyfeinstein/slidingmenu/lib/SlidingMenu.java

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import android.graphics.Rect;
1515
import android.graphics.drawable.Drawable;
1616
import android.os.Build;
17-
import android.os.Handler;
1817
import android.os.Parcel;
1918
import android.os.Parcelable;
2019
import android.util.AttributeSet;
@@ -70,7 +69,7 @@ public class SlidingMenu extends RelativeLayout {
7069

7170
private OnOpenListener mOpenListener;
7271

73-
private OnOpenListener mSecondaryOpenListner;
72+
private OnOpenListener mSecondaryOpenListener;
7473

7574
private OnCloseListener mCloseListener;
7675

@@ -224,8 +223,8 @@ public void onPageSelected(int position) {
224223
mOpenListener.onOpen();
225224
} else if (position == POSITION_CLOSE && mCloseListener != null) {
226225
mCloseListener.onClose();
227-
} else if (position == POSITION_SECONDARY_OPEN && mSecondaryOpenListner != null ) {
228-
mSecondaryOpenListner.onOpen();
226+
} else if (position == POSITION_SECONDARY_OPEN && mSecondaryOpenListener != null ) {
227+
mSecondaryOpenListener.onOpen();
229228
}
230229
}
231230
});
@@ -883,15 +882,24 @@ public void setOnOpenListener(OnOpenListener listener) {
883882
mOpenListener = listener;
884883
}
885884

886-
887885
/**
888-
* Sets the OnOpenListner for secondary menu {@link OnOpenListener#onOpen() OnOpenListener.onOpen()} will be called when the secondary SlidingMenu is opened
886+
* Sets the OnOpenListener for the secondary menu. {@link OnOpenListener#onOpen() OnOpenListener.onOpen()} will be called when the secondary SlidingMenu is opened
889887
*
890888
* @param listener the new OnOpenListener
891889
*/
892-
890+
public void setSecondaryOnOpenListener(OnOpenListener listener) {
891+
mSecondaryOpenListener = listener;
892+
}
893+
894+
/**
895+
* Sets the OnOpenListener for the secondary menu. {@link OnOpenListener#onOpen() OnOpenListener.onOpen()} will be called when the secondary SlidingMenu is opened
896+
*
897+
* @param listener the new OnOpenListener
898+
* @deprecated Use {@link #setSecondaryOnOpenListener} instead.
899+
*/
900+
@Deprecated
893901
public void setSecondaryOnOpenListner(OnOpenListener listener) {
894-
mSecondaryOpenListner = listener;
902+
mSecondaryOpenListener = listener;
895903
}
896904

897905
/**

0 commit comments

Comments
 (0)