Fix button ripples in VideoDetailFragment

This commit is contained in:
TobiGr 2020-04-22 22:35:33 +02:00
parent 0ec22c7a6e
commit 651cdec9b5
1 changed files with 11 additions and 0 deletions

View File

@ -72,6 +72,7 @@ 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.AndroidTvUtils;
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;
@ -536,6 +537,16 @@ public class VideoDetailFragment extends BaseStateFragment<StreamInfo>
setHeightThumbnail(); setHeightThumbnail();
thumbnailBackgroundButton.requestFocus(); thumbnailBackgroundButton.requestFocus();
if (AndroidTvUtils.isTv()) {
// remove ripple effects from detail controls
final int transparent = getResources().getColor(R.color.transparent_background_color);
detailControlsAddToPlaylist.setBackgroundColor(transparent);
detailControlsBackground.setBackgroundColor(transparent);
detailControlsPopup.setBackgroundColor(transparent);
detailControlsDownload.setBackgroundColor(transparent);
}
} }
@Override @Override