我是一名美国/图标包设计师/想成为开发人员,在涉及到开发方面时仍然非常环保。我正在研究概念验证应用程序(如下图所示)。 字形是用矢量drawables绘制的,我希望能够做的是根据用户输入,sharedpreferences和colors.xml更改字形颜色。这可能吗?
这是我的矢量drawable:
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="512dp"
android:width="512dp"
android:viewportHeight="512"
android:viewportWidth="512" >
<path
android:fillColor="@color/color1"
android:pathData="M202.10841,96.680962 l 125.2736,0 c 56.96724,0 102.82896,45.861718
102.82896,102.828958 l 0,112.03633 c 0,56.96724 -45.86172,102.82896
-102.82896,102.82896 l -125.2736,0 c -56.96725,0 -102.828961,-45.86172
-102.828961,-102.82896 l 0,-112.03633 c 0,-56.96724 45.861711,-102.828958
102.828961,-102.828958 z" />
<group
android:translateY="-540.36218">
<path
android:fillColor="@color/color2"
android:pathData="M 325.04765,949.21307 c -12.01898,-14.90788 -21.85269,-27.46213
-21.85269,-27.89835 0,-0.77921 46.37104,-55.98752 47.02552,-55.98752 0.18412,0
19.7568,11.76794 43.49485,26.15098 29.51558,17.88368 43.50455,26.907
44.24969,28.54239 0.89613,1.96679 0.74694,2.71968 -0.84023,4.24015
-1.06141,1.0168 -21.50483,12.97315 -45.42983,26.56968 -23.925,13.59652
-43.79129,24.89351 -44.14731,25.10442 -0.35602,0.21091 -10.48102,-11.81387
-22.5,-26.72175 z" />
</group>
</vector
&GT;