小编Bob*_*ban的帖子

Android图层列表:app:srcCompat的位图问题

更新到Studio 2.3后,当我尝试创建一个带有矢量drawable的图层列表时,它会提示使用app:srcCompat而不是android:srcin bitmap.

任何人都可以帮我添加vector drawable to layer list

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android">

<item android:drawable="@color/colorWhite" />

<item>
    <bitmap
        android:gravity="center"
        app:srcCompat="@drawable/login">
    </bitmap>

</item>

</layer-list>
Run Code Online (Sandbox Code Playgroud)

已经加入

vectorDrawables.useSupportLibrary = true
Run Code Online (Sandbox Code Playgroud)

android bitmap android-studio-2.3

22
推荐指数
2
解决办法
6188
查看次数

标签 统计

android ×1

android-studio-2.3 ×1

bitmap ×1