Optimize cinematic rendering for integrated Android TVs
This commit is contained in:
parent
dc5908cb3b
commit
1f69422354
15 changed files with 366 additions and 153 deletions
|
|
@ -42,14 +42,14 @@ final class AppTile extends LinearLayout {
|
|||
animate()
|
||||
.scaleX(f ? 1.065f : 1f)
|
||||
.scaleY(f ? 1.065f : 1f)
|
||||
.translationZ(f ? Ui.dp(c, 8) : 0)
|
||||
.setDuration(motion ? 160 : 0)
|
||||
.setInterpolator(new DecelerateInterpolator())
|
||||
.start();
|
||||
label.setTextColor(f ? Ui.WHITE : Ui.MUTED);
|
||||
updateLabel();
|
||||
art.focus = f;
|
||||
art.animate().translationZ(Ui.dp(c, f ? 8 : 1)).setDuration(motion ? 160 : 0).start();
|
||||
// Only the focused tile needs a shadow; avoid overlapping parent/child shadows.
|
||||
art.animate().translationZ(Ui.dp(c, f ? 6 : 0)).setDuration(motion ? 160 : 0).start();
|
||||
art.invalidate();
|
||||
if (focus != null) focus.changed(f);
|
||||
});
|
||||
|
|
@ -116,7 +116,7 @@ final class AppTile extends LinearLayout {
|
|||
super(c);
|
||||
fallback = s;
|
||||
setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO);
|
||||
setElevation(Ui.dp(c, 2));
|
||||
setElevation(0);
|
||||
setOutlineProvider(
|
||||
new ViewOutlineProvider() {
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue