Efek animasi hapus child pada LinearLayout
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
app
gradle/wrapper
.gitignore
README.md
build.gradle
delete-row-alpha.gif
delete-row_1.gif
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

DeleteRowAnimation

Efek animasi hapus childview pada LinearLayout.

private void addItem(){
     final Child child = new Child(MainActivity.this, colorlist.get(new Random().nextInt(Warna.length)));

     child.getImgDelete().setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                DeleteRowAnimation anim = new DeleteRowAnimation(child);
                anim.setDuration(1000);
                child.startAnimation(anim);
            }
     });
     linMain.addView(child);
}
    
    
    
for (int i = 0; i < 20; i++){
     addItem();
}
    

#SWIPE LEFT

DeleteRowAnimation anim = new DeleteRowAnimation(child);
anim.setAnimType(DeleteRowAnimation.SWIPE_LEFT);
anim.setDuration(1000);
child.startAnimation(anim);

alt tag

#ALPHA

DeleteRowAnimation anim = new DeleteRowAnimation(child);
anim.setAnimType(DeleteRowAnimation.ALPHA);
anim.setDuration(1000);
child.startAnimation(anim);

alt tag