I'm using sliding up panel from umano https://github.com/umano/AndroidSlidingUpPanel. I'm facing a minor and silly issue, but I'm not able to fix it. The sliding panel's secondary layout has a text view. When I expand it by dragging upwards, I want the textView to slowing fade and disappear(as in SoundCloud music app). And when I drag it back down the textView should be visible again. How to fix that? I tried a lot, but I failed.[![enter image description here][1]][1]
Sliding up panel marked in red.
MainActivity.java
slidingUpPanelLayout =
(SlidingUpPanelLayout)findViewById(R.id.sliding_layout);
slidingUpPanelLayout.addPanelSlideListener(new
SlidingUpPanelLayout.PanelSlideListener() {
@Override
public void onPanelSlide(View panel, float slideOffset) {
SongNameSlide.setVisibility(panel.INVISIBLE);
ArtistNameSlide.setVisibility(panel.INVISIBLE);
buttonabc.setVisibility(panel.INVISIBLE);
}
@Override
public void onPanelStateChanged(View panel,
SlidingUpPanelLayout.PanelState previousState, SlidingUpPanelLayout.PanelState newState) {
if(newState.equals(SlidingUpPanelLayout.PanelState.EXPANDED)&&
previousState.equals(SlidingUpPanelLayout.PanelState.COLLAPSED)){
SongNameSlide.setVisibility(panel.GONE);
ArtistNameSlide.setVisibility(panel.GONE);
buttonabc.setVisibility(panel.GONE);
slidingUpPanelLayout.setDragView(panel);
}
else {
SongNameSlide.setVisibility(panel.VISIBLE);
ArtistNameSlide.setVisibility(panel.VISIBLE);
buttonabc.setVisibility(panel.VISIBLE);
}
}
});
slidingUpPanelLayout.setFadeOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
slidingUpPanelLayout.setPanelState (SlidingUpPanelLayout.PanelState.COLLAPSED);
}
});