Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ gen
target/

*.iml

*.swp
18 changes: 5 additions & 13 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.4.+'
}
}
apply plugin: 'android-library'
apply plugin: 'com.android.library'

dependencies {
compile 'com.android.support:support-v4:13.0.0'
compile 'com.android.support:support-v4:20.0.0'
}

android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
compileSdkVersion 19
buildToolsVersion "20.0.0"

defaultConfig {
minSdkVersion 7
targetSdkVersion 16
targetSdkVersion 19
}

sourceSets {
Expand Down
15 changes: 11 additions & 4 deletions library/src/com/jeremyfeinstein/slidingmenu/lib/SlidingMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -203,10 +202,10 @@ public SlidingMenu(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);

LayoutParams behindParams = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
mViewBehind = new CustomViewBehind(context);
mViewBehind = newCustomViewBehind(context);
addView(mViewBehind, behindParams);
LayoutParams aboveParams = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
mViewAbove = new CustomViewAbove(context);
mViewAbove = newCustomViewAbove(context);
addView(mViewAbove, aboveParams);
// register the CustomViewBehind with the CustomViewAbove
mViewAbove.setCustomViewBehind(mViewBehind);
Expand Down Expand Up @@ -1018,5 +1017,13 @@ public void run() {
});
}
}


protected CustomViewAbove newCustomViewAbove(Context context) {
return new CustomViewAbove(context);
}

protected CustomViewBehind newCustomViewBehind(Context context) {
return new CustomViewBehind(context);
}

}