Upgrade AndroidSlidingUpPanel to 3.3.0
This commit is contained in:
parent
e5c9a7b566
commit
1fcdf57248
|
@ -39,7 +39,7 @@ dependencies {
|
||||||
compile 'com.android.support:mediarouter-v7:23.4.+'
|
compile 'com.android.support:mediarouter-v7:23.4.+'
|
||||||
compile 'com.android.support:recyclerview-v7:23.4.+'
|
compile 'com.android.support:recyclerview-v7:23.4.+'
|
||||||
compile 'com.android.support:design:23.4.+'
|
compile 'com.android.support:design:23.4.+'
|
||||||
compile 'com.sothree.slidinguppanel:library:3.0.0'
|
compile 'com.sothree.slidinguppanel:library:3.3.0'
|
||||||
compile group: 'org.eclipse.jetty', name: 'jetty-server', version:'8.1.16.v20140903'
|
compile group: 'org.eclipse.jetty', name: 'jetty-server', version:'8.1.16.v20140903'
|
||||||
compile group: 'org.eclipse.jetty', name: 'jetty-servlet', version:'8.1.16.v20140903'
|
compile group: 'org.eclipse.jetty', name: 'jetty-servlet', version:'8.1.16.v20140903'
|
||||||
compile group: 'org.eclipse.jetty', name: 'jetty-client', version:'8.1.16.v20140903'
|
compile group: 'org.eclipse.jetty', name: 'jetty-client', version:'8.1.16.v20140903'
|
||||||
|
|
|
@ -43,6 +43,7 @@ import android.widget.ImageButton;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.sothree.slidinguppanel.SlidingUpPanelLayout.PanelState;
|
||||||
import com.sothree.slidinguppanel.SlidingUpPanelLayout;
|
import com.sothree.slidinguppanel.SlidingUpPanelLayout;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
@ -194,7 +195,8 @@ public class SubsonicFragmentActivity extends SubsonicActivity implements Downlo
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPanelCollapsed(View panel) {
|
public void onPanelStateChanged(View panel, PanelState previousState, PanelState newState) {
|
||||||
|
if (newState == PanelState.COLLAPSED) {
|
||||||
isPanelClosing = false;
|
isPanelClosing = false;
|
||||||
if(bottomBar.getVisibility() == View.GONE) {
|
if(bottomBar.getVisibility() == View.GONE) {
|
||||||
bottomBar.setVisibility(View.VISIBLE);
|
bottomBar.setVisibility(View.VISIBLE);
|
||||||
|
@ -203,10 +205,7 @@ public class SubsonicFragmentActivity extends SubsonicActivity implements Downlo
|
||||||
setSupportActionBar(mainToolbar);
|
setSupportActionBar(mainToolbar);
|
||||||
recreateSpinner();
|
recreateSpinner();
|
||||||
}
|
}
|
||||||
}
|
} else if (newState == PanelState.EXPANDED) {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onPanelExpanded(View panel) {
|
|
||||||
isPanelClosing = false;
|
isPanelClosing = false;
|
||||||
currentFragment.stopActionMode();
|
currentFragment.stopActionMode();
|
||||||
|
|
||||||
|
@ -227,18 +226,9 @@ public class SubsonicFragmentActivity extends SubsonicActivity implements Downlo
|
||||||
drawerToggle.setDrawerIndicatorEnabled(false);
|
drawerToggle.setDrawerIndicatorEnabled(false);
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onPanelAnchored(View panel) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onPanelHidden(View panel) {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
slideUpPanel.setPanelSlideListener(panelSlideListener);
|
slideUpPanel.addPanelSlideListener(panelSlideListener);
|
||||||
|
|
||||||
if(getIntent().hasExtra(Constants.INTENT_EXTRA_NAME_DOWNLOAD)) {
|
if(getIntent().hasExtra(Constants.INTENT_EXTRA_NAME_DOWNLOAD)) {
|
||||||
// Post this later so it actually runs
|
// Post this later so it actually runs
|
||||||
|
@ -482,7 +472,7 @@ public class SubsonicFragmentActivity extends SubsonicActivity implements Downlo
|
||||||
}
|
}
|
||||||
|
|
||||||
if(savedInstanceState.getInt(Constants.MAIN_SLIDE_PANEL_STATE, -1) == SlidingUpPanelLayout.PanelState.EXPANDED.hashCode()) {
|
if(savedInstanceState.getInt(Constants.MAIN_SLIDE_PANEL_STATE, -1) == SlidingUpPanelLayout.PanelState.EXPANDED.hashCode()) {
|
||||||
panelSlideListener.onPanelExpanded(null);
|
panelSlideListener.onPanelStateChanged(null, null, PanelState.EXPANDED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue