mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-09-06 16:13:24 +00:00
remove controls animation/flicker
This commit is contained in:
parent
3cd485069d
commit
5aced46345
|
@ -75,7 +75,6 @@ import org.schabi.newpipe.player.playqueue.PlayQueue;
|
|||
import org.schabi.newpipe.player.playqueue.SinglePlayQueue;
|
||||
import org.schabi.newpipe.report.ErrorActivity;
|
||||
import org.schabi.newpipe.report.UserAction;
|
||||
import org.schabi.newpipe.util.AnimationUtils;
|
||||
import org.schabi.newpipe.util.Constants;
|
||||
import org.schabi.newpipe.util.ExtractorHelper;
|
||||
import org.schabi.newpipe.util.ImageDisplayConstants;
|
||||
|
@ -963,7 +962,7 @@ public class VideoDetailFragment
|
|||
}
|
||||
|
||||
private void showContent() {
|
||||
AnimationUtils.slideUp(contentRootLayoutHiding,120, 96, 0.06f);
|
||||
contentRootLayoutHiding.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
protected void setInitialData(int serviceId, String url, String name) {
|
||||
|
@ -996,9 +995,14 @@ public class VideoDetailFragment
|
|||
|
||||
@Override
|
||||
public void showLoading() {
|
||||
|
||||
super.showLoading();
|
||||
|
||||
contentRootLayoutHiding.setVisibility(View.INVISIBLE);
|
||||
//if data is already cached, transition from VISIBLE -> INVISIBLE -> VISIBLE is not required
|
||||
if(!ExtractorHelper.isCached(serviceId, url, InfoItem.InfoType.STREAM)){
|
||||
contentRootLayoutHiding.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
animateView(spinnerToolbar, false, 200);
|
||||
animateView(thumbnailPlayButton, false, 50);
|
||||
animateView(detailDurationView, false, 100);
|
||||
|
|
|
@ -228,6 +228,10 @@ public final class ExtractorHelper {
|
|||
});
|
||||
}
|
||||
|
||||
public static boolean isCached(final int serviceId, final String url, InfoItem.InfoType infoType) {
|
||||
return null != loadFromCache(serviceId, url, infoType).blockingGet();
|
||||
}
|
||||
|
||||
/**
|
||||
* A simple and general error handler that show a Toast for known exceptions, and for others, opens the report error activity with the (optional) error message.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue