Round Android Wear Emulator is Square

泄露秘密 提交于 2019-11-29 11:59:49

问题


The title and picture say it all--my round android wear emulator shows the rect layout. I'd appreciate any tips that help me get the round emulator to show the correct interface.

Created AVD using instructions from: Android Documentation

Android Studio 0.8.1 Beta, SDK Tools 23.0.2, Wear target is 4.4W(API 20)

Creating the AVD using Wayne's Command Line method created an AVD that shows the correct UI


回答1:


Make sure when you create you AVD that you select the following options for a round emulator:

Device: Android Wear Round (320 x 320: hdpi) Target: Android 4.4W - API Level 20 CPU/ABI: Android Wear ARM (armeabi-v7a) Skin: AndroidWearRound

Alternatively, you can create round or square emulators with the command lines:

android create avd --force -n WatchRound --target "android-20" --device "Android Wear Round" --skin AndroidWearRound --abi android-wear/armeabi-v7a
android create avd --force -n WatchSquare --target "android-20" --device "Android Wear Square" --skin AndroidWearSquare --abi android-wear/armeabi-v7a

It is important that Device and Skin are both consistent, and you cannot mix round and square with the same emulator. If the problem still happens, post a screen shot of your configuration.




回答2:


You don't have to use the command line to create the AVD. You should just make sure you turn off "USE HOST GPU" as this feature currently doesn't support the round watch face.




回答3:


I'd second Wayne's suggestion to use the command line to create the AVDs. If you just disable "Use Host GPU" from the UI, you get the round skin, but the wearable layouts are all still made for square displays, so the content is cut off in the corners. Also, using

android create avd --force -n WatchRound --target "android-20" --device "Android Wear Round" --skin AndroidWearRound --abi android-wear/x86

to create an x86 based emulator runs quite a bit faster on PCs in my experience.



来源:https://stackoverflow.com/questions/24640879/round-android-wear-emulator-is-square

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!