From f3fea1146c3d1ab49f400cd8469bc513c852e02d Mon Sep 17 00:00:00 2001 From: ipavl Date: Thu, 21 Aug 2014 23:24:39 -0400 Subject: [PATCH] Fixed a spelling error for mSecondaryOpenListener; deprecated old setter --- .../slidingmenu/lib/SlidingMenu.java | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/library/src/com/jeremyfeinstein/slidingmenu/lib/SlidingMenu.java b/library/src/com/jeremyfeinstein/slidingmenu/lib/SlidingMenu.java index 8b88708b9..02143709c 100644 --- a/library/src/com/jeremyfeinstein/slidingmenu/lib/SlidingMenu.java +++ b/library/src/com/jeremyfeinstein/slidingmenu/lib/SlidingMenu.java @@ -14,7 +14,6 @@ import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.os.Build; -import android.os.Handler; import android.os.Parcel; import android.os.Parcelable; import android.util.AttributeSet; @@ -70,7 +69,7 @@ public class SlidingMenu extends RelativeLayout { private OnOpenListener mOpenListener; - private OnOpenListener mSecondaryOpenListner; + private OnOpenListener mSecondaryOpenListener; private OnCloseListener mCloseListener; @@ -224,8 +223,8 @@ public void onPageSelected(int position) { mOpenListener.onOpen(); } else if (position == POSITION_CLOSE && mCloseListener != null) { mCloseListener.onClose(); - } else if (position == POSITION_SECONDARY_OPEN && mSecondaryOpenListner != null ) { - mSecondaryOpenListner.onOpen(); + } else if (position == POSITION_SECONDARY_OPEN && mSecondaryOpenListener != null ) { + mSecondaryOpenListener.onOpen(); } } }); @@ -883,15 +882,24 @@ public void setOnOpenListener(OnOpenListener listener) { mOpenListener = listener; } - /** - * Sets the OnOpenListner for secondary menu {@link OnOpenListener#onOpen() OnOpenListener.onOpen()} will be called when the secondary SlidingMenu is opened + * Sets the OnOpenListener for the secondary menu. {@link OnOpenListener#onOpen() OnOpenListener.onOpen()} will be called when the secondary SlidingMenu is opened * * @param listener the new OnOpenListener */ - + public void setSecondaryOnOpenListener(OnOpenListener listener) { + mSecondaryOpenListener = listener; + } + + /** + * Sets the OnOpenListener for the secondary menu. {@link OnOpenListener#onOpen() OnOpenListener.onOpen()} will be called when the secondary SlidingMenu is opened + * + * @param listener the new OnOpenListener + * @deprecated Use {@link #setSecondaryOnOpenListener} instead. + */ + @Deprecated public void setSecondaryOnOpenListner(OnOpenListener listener) { - mSecondaryOpenListner = listener; + mSecondaryOpenListener = listener; } /**