I am using AndroidSlidingUpPanel on my project . I want to disable sliding on specific condition . So that only top part is visible , and dragging is disabled .
if(condition){
mSlidingLayout.setEnabled(false);
mSlidingLayout.setClickable(false);
}
if the above code doesn't work then try like
if(condition){
runOnUiThread(new Runnable() {
@Override
public void run() {
mSlidingLayout.setEnabled(false);
mSlidingLayout.setClickable(false);
}
});
}