Reputation: 324
I'm developing for android wear, and instead of using 2 different layouts (one for rect, and one for round), can I just use resource qualifiers instead?
For example, I have a layout file: activity_main.xml. It references pizza.png. can I make it so that the round watch (320x320) pulls the image from drawable-w320dp while the rectangle watch (280x280) pulls the image from drawable-w280dp?
Thanks
Upvotes: 2
Views: 368
Reputation: 55350
Update: There are specific qualifiers as of API 23 (-round and -notround). Check out the official blogpost.
Original Answer:
No, I don't think so. There are no specific qualifiers for form factor (such as -round
or -square
) and the screen size in pixels is not the same across all square devices. For example, the Samsung Gear Live is 320x320 too.
Moreover, these values are in pixels, not dp as in your example, but this is a minor point.
Upvotes: 2
Reputation: 10383
You should use -nodpi
for backgrounds, and -hdpi
for rest of graphic files (for now, it might change in the future). There are no shape specific folders as that should be handled in StubView
or by fitting content in by using for example BoxInsetLayout
.
Upvotes: 0