|
14 | 14 | import android.graphics.Rect;
|
15 | 15 | import android.graphics.drawable.Drawable;
|
16 | 16 | import android.os.Build;
|
17 |
| -import android.os.Handler; |
18 | 17 | import android.os.Parcel;
|
19 | 18 | import android.os.Parcelable;
|
20 | 19 | import android.util.AttributeSet;
|
@@ -70,7 +69,7 @@ public class SlidingMenu extends RelativeLayout {
|
70 | 69 |
|
71 | 70 | private OnOpenListener mOpenListener;
|
72 | 71 |
|
73 |
| - private OnOpenListener mSecondaryOpenListner; |
| 72 | + private OnOpenListener mSecondaryOpenListener; |
74 | 73 |
|
75 | 74 | private OnCloseListener mCloseListener;
|
76 | 75 |
|
@@ -224,8 +223,8 @@ public void onPageSelected(int position) {
|
224 | 223 | mOpenListener.onOpen();
|
225 | 224 | } else if (position == POSITION_CLOSE && mCloseListener != null) {
|
226 | 225 | 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(); |
229 | 228 | }
|
230 | 229 | }
|
231 | 230 | });
|
@@ -883,15 +882,24 @@ public void setOnOpenListener(OnOpenListener listener) {
|
883 | 882 | mOpenListener = listener;
|
884 | 883 | }
|
885 | 884 |
|
886 |
| - |
887 | 885 | /**
|
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 |
889 | 887 | *
|
890 | 888 | * @param listener the new OnOpenListener
|
891 | 889 | */
|
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 |
893 | 901 | public void setSecondaryOnOpenListner(OnOpenListener listener) {
|
894 |
| - mSecondaryOpenListner = listener; |
| 902 | + mSecondaryOpenListener = listener; |
895 | 903 | }
|
896 | 904 |
|
897 | 905 | /**
|
|
0 commit comments