矢量绘图 Android 23.3.0
Vector Drawables Android 23.3.0
我得到了“23.3.0”支持库版本,尝试这样做时可以:
<android.support.v7.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@drawable/abc"
app:layout_collapseMode="pin"/>
drawable 没有出现在设备中 运行 api 21。事实上,我的应用程序有最小 Api 21,甚至在 android studio 预览,只有N Preview Api 23 会实际绘制背景。对于普通的 ImageView,我从来没有遇到过任何问题。向量是这个:
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="414dp"
android:height="100dp"
android:viewportWidth="414"
android:viewportHeight="100">
<path
android:fillColor="#FFD50000"
android:pathData="M 0,0 414,0 414,65 0,100 0,0"/>
</vector>
知道为什么它没有出现吗?
您绝对应该更新您的支持库:
Android Support Library 23.4.0 available now
This release of the Android Support Library fixes a number of bugs in
Support v4, AppCompat, Design, and Vector Drawable Compat. See the
revisions page (https://developer.android.com/tools/support-library/index.html) for a full list of closed
issues.
https://plus.google.com/+AndroidDevelopers/posts/B7QhFkWZ6YX
我得到了“23.3.0”支持库版本,尝试这样做时可以:
<android.support.v7.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@drawable/abc"
app:layout_collapseMode="pin"/>
drawable 没有出现在设备中 运行 api 21。事实上,我的应用程序有最小 Api 21,甚至在 android studio 预览,只有N Preview Api 23 会实际绘制背景。对于普通的 ImageView,我从来没有遇到过任何问题。向量是这个:
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="414dp"
android:height="100dp"
android:viewportWidth="414"
android:viewportHeight="100">
<path
android:fillColor="#FFD50000"
android:pathData="M 0,0 414,0 414,65 0,100 0,0"/>
</vector>
知道为什么它没有出现吗?
您绝对应该更新您的支持库:
Android Support Library 23.4.0 available now
This release of the Android Support Library fixes a number of bugs in Support v4, AppCompat, Design, and Vector Drawable Compat. See the revisions page (https://developer.android.com/tools/support-library/index.html) for a full list of closed issues.
https://plus.google.com/+AndroidDevelopers/posts/B7QhFkWZ6YX