BryanB
BryanB

Reputation: 45

How do I add default wallpaper for landscape and portrait accordingly?

I'm customizing AOSP source. I have two images for different resolutions for my tablet. The images are: One for landscape and the other for portrait. How do I change the images for the wallpaper when the configuration changes?

Additional comment: I don't have enough reputation to write a comment, so I'm writing here. I've already tried drawable-port, drawable-land, drawable-... etc. But it didn't work. The wallpaper of AOSP doesn't follow this rule. If orientation change happens, wallpaper bitmap is internally rotated and zoomed. I can't find the source code to fix it... it's too complicated and there's no document.

Upvotes: 0

Views: 100

Answers (1)

Patryk Czarnota
Patryk Czarnota

Reputation: 71

Put this images into orientation depend directories, for example:

Resource dir name for portait mode: drawable-port and for landscape mode: drawable-land

Example path where default_wallpaper of aosp14 system is placed: frameworks/base/core/res/res/drawable-nodpi/default_wallpaper.png

Check out other drawable variants also.

Upvotes: 0

Related Questions