0
Fork 0
mirror of https://github.com/Silent1566/webhtv.git synced 2026-10-16 10:32:44 +00:00

fix(tv): TV 横幅按 320x180dp 出图,消除启动器放大导致的字标锯齿

用户反馈横屏图标(Android TV banner)分辨率不够、锯齿严重。横幅此前按官方
xhdpi 最小尺寸 320x180 px(即 160x90 dp)出图,而启动器磁贴按 dp 绘制:
1080p/xhdpi 磁贴要 640x360 px、4K 要 1280x720 px,启动器只能把位图放大,
字标因此出现锯齿。

改为每档按 320x180 dp 出图(mdpi 320x180 起,xxxhdpi 1280x720),即官方
最小尺寸的 2 倍:启动器要么 1:1 取用、要么缩小,两条路径都不再放大。
图像内容未改动——新的 mdpi/hdpi/xhdpi 与旧的 xhdpi/xxhdpi/xxxhdpi 逐字节
一致,仅新增 xxhdpi 960x540 与 xxxhdpi 1280x720 两档更大的图,APK 约 +94 KB。

Verification: bash ./gradlew :app:testLeanbackArm64_v8aDebugUnitTest --tests com.fongmi.android.tv.setting.AppBrandingContractTest => 13 tests, 0 failures, 0 errors(含 tvBannerIsProvidedPerDensityAtFullResolution 按新尺寸逐档断言 + 16:9);5 档横幅实测 320x180/480x270/640x360/960x540/1280x720;新 mdpi/hdpi/xhdpi 与旧 xhdpi/xxhdpi/xxxhdpi 逐字节一致

Task-Guard: tv-banner-hidpi
This commit is contained in:
Silent1566 2026-10-12 23:09:12 +08:00
commit c0ba017885
7 changed files with 15 additions and 6 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Before After
Before After