Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Expand, Collapse, slideToAnchor and IsExpanded methods #807

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:2.3.2'
classpath 'com.android.tools.build:gradle:2.2.3'
}
}

Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Aug 23 22:44:32 CEST 2016
#Sun Feb 19 00:15:41 EET 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,35 @@ public boolean isClipPanel() {
return mClipPanel;
}

/**
* Check if panel expanded or not
*
* @return true if expanded false if collapsed
*/
public boolean isExpanded() {
return getPanelState() == PanelState.EXPANDED;
}

/**
* Expand panel
*/
public void expand() {
setPanelState(PanelState.EXPANDED);
}

/**
* Collapse panel
*/
public void collapse() {
setPanelState(PanelState.COLLAPSED);
}

/**
* Slide panel to anchor
*/
public void slideToAnchor() {
setPanelState(PanelState.ANCHORED);
}

void dispatchOnPanelSlide(View panel) {
synchronized (mPanelSlideListeners) {
Expand Down