[BUG] Overscale in Android JB and ICS Easter Eggs with 1080p phone screen
Closed this issue · 7 comments
Checklist / 检查清单
- No one has submitted a similar or identical bug report before. / 之前没有人提交过类似或相同的 bug report。
- I'm using the latest version of Easter Eggs. / 我正在使用 Easter Eggs 的最新版本。
Easter Eggs version / Easter Eggs 版本
v2.5.0 (from F-Droid)
Bug description / Bug 描述
With standard phone screen metrics (1080 x 1920, 401dpi = xxhdpi) objects that are too large are displayed, as in the original medium-sized objects are displayed. This can be easily seen in the text below (Android Jelly Bean easter egg) and in the Nyandroid object animation (Android Ice Cream Sandwich easter egg).
The problem was also noticed in the original implementation with exactly the same screen resolution.
720 x 1280 vs. 1080 x 1920
It would be nice if these easter eggs were adapted for high resolution (higher than 720 x 1280) or would you suggest manual scaling adjustment.
Expected behavior / 预期行为
Found in Android ICS & JB easter eggs (including system).
Actual behavior / 实际行为
Overscaled in some easter eggs.
Steps to reproduce / 复现步骤
- Open the app
- Open BeanBag (click to show Android version) and/or Nyandroid (hold for a few seconds)
UI / OS
AOSP
Android Version / Android 版本
6
Additional info / 额外信息
No response
The text display size is controlled by some magic number, I will not try to change it, but I will deal with the text wrapped does not center
But the problem is not so much in the text, but rather in the objects that were involved in the easter eggs. After all, they are full of places where this resolution is not adapted.
As for the object scaling problem, I don't see any problem in the screenshots, they are just scaled according to different dpi, which is a problem on almost all Android Views.
As for the object scaling problem, I don't see any problem in the screenshots, they are just scaled according to different dpi, which is a problem on almost all Android Views.
I understand
I found the reason for this problem because there is no limit on the size of the ImageView, The image size will be scaled according to the device screen density.
- JB:
AndroidEasterEggs/eggs/JellyBean/src/main/java/com/android_j/egg/BeanBag.java
Lines 288 to 294 in f8f6381
- ICS:
I fixed the targetDensity of BitmapDrawable to 480 to solve this problem.
commit: 39ce917
- ICS:
- JB:
AndroidEasterEggs/eggs/JellyBean/src/main/java/com/android_j/egg/BeanBag.java
Lines 155 to 156 in 39ce917
Thanks!