我需要创建一个Android drawable,其中单词oryx
正在使用以下向量进行写入:
<glyph glyph-name="O" unicode="O" horiz-adv-x="657" d="M194 268q3 -35 8.5 -55.5t20 -40.5t43.5 -29t74 -9q35 0 60 11t37 25t19 34t8 30t1 22v10.5v16t-1 19.5t-3.5 22.5t-7 22.5t-11 22.5t-17 19.5t-23.5 16.5t-31.5 10.5t-40.5 4q-40 0 -68 -11t-41 -25.5t-20 -38t-7.5 -36.5t0.5 -33v-8zM45 277q-1 6 -1.5 16t3 39 t11.5 55.5t28 58.5t49.5 55t79.5 38.5t114 15.5q45 0 83 -7t65.5 -19t49 -30t35.5 -35.5t23.5 -41.5t14.5 -41.5t7 -41t2.5 -35.5t0 -30.5t-0.5 -20.5q0 -16 -1 -29t-6 -41t-14 -50t-28.5 -48t-46 -43.5t-69 -29.5t-95.5 -12q-55 0 -98 7t-73 18.5t-52.5 31.5t-36.5 41 t-23 52t-13.5 59.5t-7.5 67.5z"/>
<glyph glyph-name="R" unicode="R" horiz-adv-x="459" d="M412 555q-1 -2 0.5 -21t-0.5 -36.5t-8 -37.5t-24.5 -32t-47.5 -12q-42 0 -65 -3t-41 -15t-24 -34t-6 -60v-320q-18 13 -47.5 20.5t-50 11.5t-36.5 23.5t-16 56.5v268q0 6 0.5 16.5t3.5 29t10 37t21 38.5t34 35t51.5 25t70.5 10h99h35h11.5h29.5z"/>
<glyph glyph-name="Y" unicode="Y" horiz-adv-x="684" d="M275 27h134l-86 -189q-38 -41 -92 -41q-24 0 -41.5 12.5t-23.5 24.5l-6 13l110 219q-2 5 -4 11q-36 88 -97 207.5t-87.5 167.5t-42.5 76l16 5t32 9t39.5 3.5t44 -6.5t41.5 -24.5t34 -49.5q14 -40 39.5 -97t44.5 -95t19 -39q67 169 93 244q13 30 33.5 48.5t40.5 24t42.5 5 t38.5 -5t30.5 -9.5t15.5 -5q-87 -175 -168 -372q-16 -37 -38.5 -64t-42 -40.5t-45 -21.5t-40 -9.5t-34.5 -1.5z"/>
<glyph glyph-name="X" unicode="X" horiz-adv-x="648" d="M48 526q15 9 37 15.5t52 8t63 -13.5t59 -47q27 -33 72 -92q54 73 86 118q31 29 71 32.5t69 -10t40 -33.5q-40 -53 -173 -231q149 -199 182 -243q-11 -19 -40 -33t-69 -10.5t-71 32.5q-34 48 -95 130q-51 -67 -81 -104q-26 -32 -59 -47t-63 -13t-52 8t-37 15 q71 98 198 265q-119 157 -189 253z"/>
我创建了文件drawable/oryx.xml
,并从下面的代码开始尝试获取字母O
但是当我在布局文件中使用它时没有出现任何内容:android:background="@drawable/oryx"
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="684dp"
android:width="684dp"
android:viewportWidth="684.0"
android:viewportHeight="684.0">
<group
android:name="rotationGroup"
android:pivotX="10.0"
android:pivotY="10.0"
android:rotation="0.0" >
<path
android:name="O"
android:fillColor="#FF000000"
android:pathData="M194 268q3 -35 8.5 -55.5t20 -40.5t43.5 -29t74 -9q35 0 60 11t37 25t19 34t8 30t1 22v10.5v16t-1 19.5t-3.5 22.5t-7 22.5t-11 22.5t-17 19.5t-23.5 16.5t-31.5 10.5t-40.5 4q-40 0 -68 -11t-41 -25.5t-20 -38t-7.5 -36.5t0.5 -33v-8zM45 277q-1 6 -1.5 16t3 39 t11.5 55.5t28 58.5t49.5 55t79.5 38.5t114 15.5q45 0 83 -7t65.5 -19t49 -30t35.5 -35.5t23.5 -41.5t14.5 -41.5t7 -41t2.5 -35.5t0 -30.5t-0.5 -20.5q0 -16 -1 -29t-6 -41t-14 -50t-28.5 -48t-46 -43.5t-69 -29.5t-95.5 -12q-55 0 -98 7t-73 18.5t-52.5 31.5t-36.5 41 t-23 52t-13.5 59.5t-7.5 67.5z"
android:fillAlpha=".3"/>
</group>
</vector>
任何人都可以帮到这里。输出必须如下。感谢
答案 0 :(得分:1)
试试这个,
onError