Background image for android wear notification

2019-05-01 04:54发布

I want to set background image for Android Wear notification. What should be the size of the image?

3条回答
看我几分像从前
2楼-- · 2019-05-01 05:01

In which use cases do you require parallax scrolling? I believe it only works in Notifications and GridViewPager.

查看更多
Lonely孤独者°
3楼-- · 2019-05-01 05:15

The resolution for square watch faces as of right now is 280x280, whereas the circular watch face has a resolution of 320x320 (although some of this will be cut off, obviously).

However, Android Wear implements a sort of parallax scrolling by default for larger images, so it can handle larger images with great ease, and it is even recommended that you do so (see this previous answer). So you really shouldn't worry about the size of the image, unless you were trying to create a static, full-screen image with specific areas of interaction as a substitute for custom UI elements (which you can do, I might add, although Google recommends you have only one area of interaction per screen on the watch to keep things simple).

If you want to see a good example of multiple images being used for backgrounds with parallax scrolling, I recommend you check out the GridViewPager sample project, which can be found in the SDK samples in the wearable subfolder for API level 20.

查看更多
姐就是有狂的资本
4楼-- · 2019-05-01 05:17

The documentation for Android Wear specifies that the background should be 400 x 400 if it should not use parallax scrolling and a size of 640x400 if it should support parallax scrolling.

The image should be put into the drawable-nodpi folder of your android app.

I couldn't make out a difference in the scrolling with different backgrounds. The bigger background is cropped to 400 x 400 and even if scrolling nothing outside the 400 x400 area is shown.

查看更多
登录 后发表回答