https://kotlinlang.org logo
#compose
Title
# compose
z

zsperske

12/07/2020, 5:48 PM
Are there any known issues with
vectorResource
? This asset draws as white when placed in the
TopAppBar.navigationIcon
of a
Scaffold
Copy code
<vector xmlns:android="<http://schemas.android.com/apk/res/android>"
    android:width="24dp"
    android:height="24dp"
    android:viewportWidth="24"
    android:viewportHeight="24">
  <path
      android:pathData="M12.1523,2C9.2617,1.957 6.6484,3.1563 4.7969,5.0898L2.8555,3.1445C2.6602,2.9531 2.3398,2.9531 2.1484,3.1445C2.0469,3.2422 2,3.3711 2,3.5L2,8C2,8.5508 2.4492,9 3,9L7.5,9C7.6289,9 7.7539,8.9492 7.8555,8.8555C8.0469,8.6602 8.0469,8.3398 7.8555,8.1484L6.2188,6.5078C8.0273,4.6016 10.75,3.5703 13.6914,4.1758C16.7656,4.8125 19.2305,7.3008 19.8398,10.3789C20.8516,15.5 16.9414,20 12,20C7.8828,20 4.4805,16.8711 4.0469,12.8633C3.9922,12.3672 3.5625,12 3.0625,12C2.4609,12 1.9961,12.5234 2.0625,13.1211C2.6211,18.1094 6.8672,22 12,22C18.1367,22 23,16.4453 21.8242,10.0977C21.0781,6.0742 17.8164,2.8594 13.7891,2.1563C13.2344,2.0586 12.6875,2.0117 12.1523,2.0039ZM12,6C11.4492,6 11,6.4492 11,7L11,12C11,12.2656 11.1055,12.5195 11.293,12.707L13.5859,15C13.9766,15.3906 14.6094,15.3906 15,15C15.3906,14.6094 15.3906,13.9766 15,13.5859L13,11.5859L13,7C13,6.4492 12.5508,6 12,6ZM12,6"
      android:fillColor="#3498DB"
      android:fillType="nonZero"
      android:strokeColor="#00000000"/>
</vector>
b

BenjO

12/07/2020, 6:12 PM
If you use the
Icon
composable, it has a tint parameter that should do the trick. You can wrap it in an
IconButton
z

zsperske

12/07/2020, 6:13 PM
yup that's what I ended up doing, thanks!
👍 1