android-wear-complication

How set complication on watch face of ICON,RANGED_VALUE,SMALL_IMAGE on android wear

帅比萌擦擦* 提交于 2019-12-13 07:58:05
问题 I tried to draw icon on android watch face but did not see on watch face. I already check this link.Ref I set text on watchface for complication TYPE text but it does not set for other type like ICON,RANGED_VALUE,SMALL_IMAGE so please suggest. I need this type icon where red mark complication. I used this code for draw text. if (COMPLICATION_IDS[i] == RIGHT_DIAL_COMPLICATION) { // RIGHT_DIAL_COMPLICATION calculations int offset = (int) ((mWidth / 2) - textWidth) / 2; complicationsX = (mWidth

How do I draw icons on a watch face from an Android wear complication provider?

混江龙づ霸主 提交于 2019-12-12 12:34:08
问题 Using the Complications API there's an icon type, but when it comes to drawing the icon I'm not sure how to do it. When I'm drawing the actual watch face there doesn't seem to be a drawIcon method. E.g. something like canvas.drawIcon(icon). I can only see how to draw a bitmap. In my drawComplications method I have this: } else if (complicationData.getType() == ComplicationData.TYPE_ICON) { Icon icon = complicationData.getIcon(); How do I then draw the icon to the canvas? The code lab here