WatchViewStub已过时

问题描述:

我开始制作可穿戴应用程序,并且我可以在我的MainActivity中看到WatchViewStub已被弃用。我在网上搜索我应该使用什么,而不是WatchViewStub,但我找不到任何东西。我使用support:wearable:2.0.0-alpha3'。任何人都可以帮忙?WatchViewStub已过时

谢谢!

+1

你可能要检查这个[博客](https://sterlingudell.wordpress.com/category/wearables/),它会告诉用'WatchViewStub'一种解决方法。你可以尝试['onApplyWindowInsets'](https://developer.android.com/training/wearables/watch-faces/issues.html#ScreenShape),它可以很容易地获得那里的屏幕形状 - 并相应地扩大适当的布局。另外,你可以检查这个[git](https://gist.github.com/tajchert/a49c22f54962bd9005bc)代码实现目的。此git显示Android Wear设备上的屏幕形状检测。希望这可以帮助! –

这是关于该主题的Android开发者博客。 BoxInsetLayout和新的-round资源限定符是几个选项。

http://android-developers.blogspot.com/2016/04/build-beautifully-for-android-wear.html