vectorDrawable使用==>iconFont + SVG转换xml

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/heming9174/article/details/79152696

emm...

iconfont下载SVG格式的 矢量图,然后转换成xml格式使用,美滋滋.

记一下地址,免得下次使用忘记了.

> http://inloop.github.io/svg2android/


在build.gradle里面配置...

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.kusofan.seeweather"
        minSdkVersion 16
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        targetCompatibility JavaVersion.VERSION_1_8
        sourceCompatibility JavaVersion.VERSION_1_8
    }
    buildToolsVersion '26.0.2'
}

vectorDrawables.useSupportLibrary = true
 这一行!!!

猜你喜欢

转载自blog.csdn.net/heming9174/article/details/79152696