Android Wear 2.0为TYPE_EMPTY设置了一个复杂功能

时间:2016-11-08 18:44:27

标签: android-wear-2.0 android-wear-complication

目前是否有办法根据其ID调用/设置并发症的类型为TYPE_EMPTY?我知道我想要哪个复杂功能基本上“关闭”或设置为TYPE_EMPTY,当我想要,但我不知道如何访问内部复杂系统来更新复杂功能而无需访问ComplicationManager的实例。

基本上我如何以编程方式关闭并发症,例如在ComplicationHelperActivity中手动点击并发症为“空”?

1 个答案:

答案 0 :(得分:0)

To turn a complication off for your watch face, you could call setActiveComplications(int complications...) which is a method of WatchFaceService without the complication that you want to turn off.

For example, if your watch face has 3 complications that correspond to {1, 2, 3} and you want to turn complication 3 off, you should call setActiveComplications(new int[] {1, 2}), then the complication 3 will be turned off.