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.player.playqueue.SinglePlayQueue;
|
||||||
import org.schabi.newpipe.report.ErrorActivity;
|
import org.schabi.newpipe.report.ErrorActivity;
|
||||||
import org.schabi.newpipe.report.UserAction;
|
import org.schabi.newpipe.report.UserAction;
|
||||||
import org.schabi.newpipe.util.AnimationUtils;
|
|
||||||
import org.schabi.newpipe.util.Constants;
|
import org.schabi.newpipe.util.Constants;
|
||||||
import org.schabi.newpipe.util.ExtractorHelper;
|
import org.schabi.newpipe.util.ExtractorHelper;
|
||||||
import org.schabi.newpipe.util.ImageDisplayConstants;
|
import org.schabi.newpipe.util.ImageDisplayConstants;
|
||||||
|
@ -963,7 +962,7 @@ public class VideoDetailFragment
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showContent() {
|
private void showContent() {
|
||||||
AnimationUtils.slideUp(contentRootLayoutHiding,120, 96, 0.06f);
|
contentRootLayoutHiding.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setInitialData(int serviceId, String url, String name) {
|
protected void setInitialData(int serviceId, String url, String name) {
|
||||||
|
@ -996,9 +995,14 @@ public class VideoDetailFragment
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void showLoading() {
|
public void showLoading() {
|
||||||
|
|
||||||
super.showLoading();
|
super.showLoading();
|
||||||
|
|
||||||
|
//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);
|
contentRootLayoutHiding.setVisibility(View.INVISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
animateView(spinnerToolbar, false, 200);
|
animateView(spinnerToolbar, false, 200);
|
||||||
animateView(thumbnailPlayButton, false, 50);
|
animateView(thumbnailPlayButton, false, 50);
|
||||||
animateView(detailDurationView, false, 100);
|
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.
|
* 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 New Issue