Skip to content

Commit 03dce04

Browse files
author
jfeinstein10
committed
Forgot to push these before
1 parent eee62fe commit 03dce04

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

library/src/com/slidingmenu/lib/CustomViewAbove.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,11 +544,11 @@ public int getBehindWidth() {
544544
// return getWidth() - (int)homeWidth;
545545
}
546546

547-
public boolean isPagingEnabled() {
547+
public boolean isSlidingEnabled() {
548548
return mEnabled;
549549
}
550550

551-
public void setPagingEnabled(boolean b) {
551+
public void setSlidingEnabled(boolean b) {
552552
mEnabled = b;
553553
}
554554

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,16 @@ public SlidingMenu(Context context, AttributeSet attrs, int defStyle) {
4141
// set the above and behind views if defined in xml
4242
int viewAbove = ta.getResourceId(R.styleable.SlidingMenu_viewAbove, -1);
4343
if (viewAbove != -1) {
44-
LayoutInflater inflater = (LayoutInflater)
45-
context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
46-
setAboveView(inflater.inflate(viewAbove, null));
44+
View v = LayoutInflater.from(context).inflate(viewAbove, null);
45+
setAboveView(v);
4746
}
4847
int viewBehind = ta.getResourceId(R.styleable.SlidingMenu_viewBehind, -1);
4948
if (viewBehind != -1) {
50-
LayoutInflater inflater = (LayoutInflater)
51-
context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
52-
setBehindView(inflater.inflate(viewBehind, null));
49+
View v = LayoutInflater.from(context).inflate(viewBehind, null);
50+
setBehindView(v);
5351
}
5452
// set the offset and scroll scale if defined in xml
55-
int offsetBehind = ta.getInt(R.styleable.SlidingMenu_behindOffset, 0);
53+
int offsetBehind = (int) ta.getDimension(R.styleable.SlidingMenu_behindOffset, 0);
5654
setBehindOffset(offsetBehind);
5755
float scrollOffsetBehind = ta.getFloat(R.styleable.SlidingMenu_behindScrollScale, 0.0f);
5856
setBehindScrollScale(scrollOffsetBehind);

0 commit comments

Comments
 (0)