小编Pra*_*mar的帖子

将android矢量可绘制XML转换为SVG

如何将我的 android vector drawable 转换为 SVG?不要将其标记为重复问题。我已经尝试过这些方法但没有奏效,我尝试过https://shapeshifter.design/网站,但实际上它很好,但它给了我错误的输入和输出。

假设我有一个向量

<vector android:height="80dp" android:viewportHeight="512"
    android:viewportWidth="512" android:width="80dp" xmlns:android="http://schemas.android.com/apk/res/android">

    <path android:fillColor="@color/colorLightYellow" android:pathData="M150.561,144.549c-1.315,0 -2.647,-0.341 -3.86,-1.06L52.164,87.532c-3.609,-2.136 -4.803,-6.793 -2.667,-10.402c2.137,-3.608 6.793,-4.802 10.402,-2.667l94.537,55.957c3.609,2.136 4.803,6.793 2.667,10.402C155.685,143.217 153.156,144.549 150.561,144.549z"/>
    <path android:fillColor="@color/colorLightYellow" android:pathData="M150.568,144.548H47.842c-4.194,0 -7.593,-3.399 -7.593,-7.593s3.4,-7.593 7.593,-7.593h102.727c4.194,0 7.593,3.399 7.593,7.593S154.762,144.548 150.568,144.548z"/>
    <path android:fillColor="@color/colorLightOrange" android:pathData="M342.693,335.833L207.961,136.955l51.811,-74.838c10.849,-15.671 -0.367,-37.077 -19.426,-37.077H118.183c-19.059,0 -30.275,21.406 -19.426,37.077l51.811,74.838L15.836,335.833C5.516,351.066 0,369.043 0,387.443l0,0c0,50.82 41.198,92.018 92.017,92.018h174.495c50.82,0 92.017,-41.198 92.017,-92.018l0,0C358.529,369.043 353.013,351.066 342.693,335.833z"/>
    <path android:fillColor="@color/colorLightOrange" android:pathData="M342.693,335.833L207.961,136.955l51.811,-74.838c10.849,-15.671 -0.367,-37.077 -19.426,-37.077h-22.144c17.303,0 27.486,21.406 17.637,37.077l-47.038,74.838L311.12,335.833c9.369,15.233 14.377,33.211 14.377,51.61c0,50.82 -37.402,92.018 -83.539,92.018h24.555c50.82,0 92.017,-41.198 92.017,-92.018C358.529,369.043 353.013,351.066 342.693,335.833z"/>
    <path android:fillColor="@color/colorLightYellow" android:pathData="M214.129,144.548h-71.883c-4.194,0 -7.593,-3.399 -7.593,-7.593s3.4,-7.593 7.593,-7.593h71.883c4.194,0 7.593,3.399 7.593,7.593S218.323,144.548 214.129,144.548z"/>
    <path android:fillColor="#FCAB29" android:pathData="M393.083,249.127c-65.571,0 -118.917,53.346 …
Run Code Online (Sandbox Code Playgroud)

svg png android android-drawable android-vectordrawable

10
推荐指数
3
解决办法
6356
查看次数

在 kotlin 中添加 2 个或更多构造函数

如何添加 2 个或更多构造函数?我知道在 kotlin 中使用数据类,但我不知道这个关键字在 kotlin 中到底是什么,为什么我们必须在里面放任何东西?

public class Model {
    public String mId, mTitle, mDesc;

    public Model() {

    }

    public Model(String mId, String mTitle, String mDesc) {
        this.mId = mId;
        this.mTitle = mTitle;
        this.mDesc = mDesc;
    }

    public String getmId() {
        return mId;
    }

    public void setmId(String mId) {
        this.mId = mId;
    }

    public String getmTitle() {
        return mTitle;
    }

    public void setmTitle(String mTitle) {
        this.mTitle = mTitle;
    }

    public String getmDesc() {
        return mDesc;
    }

    public void setmDesc(String …
Run Code Online (Sandbox Code Playgroud)

java android kotlin

5
推荐指数
1
解决办法
77
查看次数