diff --git a/README.md b/README.md index 79045db..ee3c04b 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ repositories { Module build.gradle ```java dependencies { - compile 'com.github.iammert:MaterialIntroView:1.3' + compile 'com.github.iammert:MaterialIntroView:1.4' } ``` diff --git a/materialintro/src/main/java/co/mobiwise/materialintro/view/MaterialIntroView.java b/materialintro/src/main/java/co/mobiwise/materialintro/view/MaterialIntroView.java index 08a5cfc..ccf2d4a 100644 --- a/materialintro/src/main/java/co/mobiwise/materialintro/view/MaterialIntroView.java +++ b/materialintro/src/main/java/co/mobiwise/materialintro/view/MaterialIntroView.java @@ -12,6 +12,7 @@ import android.os.Build; import android.os.Handler; import android.util.AttributeSet; +import android.util.Log; import android.util.TypedValue; import android.view.Gravity; import android.view.LayoutInflater; @@ -399,6 +400,7 @@ private void dismiss() { @Override public void onAnimationEnd() { setVisibility(GONE); + removeMaterialView(); if (materialIntroListener != null) materialIntroListener.onUserClicked(materialIntroViewId); @@ -406,6 +408,11 @@ public void onAnimationEnd() { }); } + private void removeMaterialView(){ + if(getParent() != null ) + ((ViewGroup) getParent()).removeView(this); + } + /** * locate info card view above/below the * circle. If circle's Y coordiante is bigger than diff --git a/sample/build.gradle b/sample/build.gradle index 2aa8265..650499e 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -24,6 +24,6 @@ dependencies { testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.1.1' compile 'com.android.support:design:23.1.1' - //compile 'com.github.iammert:MaterialIntroView:1.3' + //compile 'com.github.iammert:MaterialIntroView:a4b7947d19' compile project(':materialintro') }