Skip to content

Commit 08f65e5

Browse files
committed
View is removed after dismissed.
1 parent a4b7947 commit 08f65e5

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ repositories {
3434
Module build.gradle
3535
```java
3636
dependencies {
37-
compile 'com.github.iammert:MaterialIntroView:1.3'
37+
compile 'com.github.iammert:MaterialIntroView:1.4'
3838
}
3939
```
4040

materialintro/src/main/java/co/mobiwise/materialintro/view/MaterialIntroView.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import android.os.Build;
1313
import android.os.Handler;
1414
import android.util.AttributeSet;
15+
import android.util.Log;
1516
import android.util.TypedValue;
1617
import android.view.Gravity;
1718
import android.view.LayoutInflater;
@@ -399,13 +400,19 @@ private void dismiss() {
399400
@Override
400401
public void onAnimationEnd() {
401402
setVisibility(GONE);
403+
removeMaterialView();
402404

403405
if (materialIntroListener != null)
404406
materialIntroListener.onUserClicked(materialIntroViewId);
405407
}
406408
});
407409
}
408410

411+
private void removeMaterialView(){
412+
if(getParent() != null )
413+
((ViewGroup) getParent()).removeView(this);
414+
}
415+
409416
/**
410417
* locate info card view above/below the
411418
* circle. If circle's Y coordiante is bigger than

sample/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ dependencies {
2424
testCompile 'junit:junit:4.12'
2525
compile 'com.android.support:appcompat-v7:23.1.1'
2626
compile 'com.android.support:design:23.1.1'
27-
//compile 'com.github.iammert:MaterialIntroView:1.3'
27+
//compile 'com.github.iammert:MaterialIntroView:a4b7947d19'
2828
compile project(':materialintro')
2929
}

0 commit comments

Comments
 (0)