Skip to content
This repository has been archived by the owner on Feb 20, 2021. It is now read-only.

Update SLidingLayer.java #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
16 changes: 16 additions & 0 deletions Library/src/com/slidinglayer/SlidingLayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,22 @@ public boolean isOpened() {
return mIsOpen;
}

public void toggleLayer(boolean smoothAnim) {
if(mIsOpen){
closeLayer(smoothAnim, false);
}else{
openLayer(smoothAnim, false);
}
}

public void toggleLayer(boolean smoothAnim, boolean forceOpen) {
if(mIsOpen){
switchLayer(false, smoothAnim, forceClose, 0, 0);
}else{
switchLayer(true, smoothAnim, forceOpen, 0, 0);
}
}

public void openLayer(boolean smoothAnim) {
openLayer(smoothAnim, false);
}
Expand Down