Android 使用 SVG 矢量圖


android svg矢量圖 可能包含的操作有:

SVG圖還包括改變顏色,透明度,大小,矩陣操作(平移、旋轉、縮放),selector, (圖標,背景,按鈕),動畫,等

 

setTint(int ColorRes)  // 設置顏色

        iv_arrow = findViewById(R.id.iv_arrow);
        VectorDrawableCompat vectorDrawableCompat = VectorDrawableCompat.create(getResources(), 
                R.drawable.ic_arrow, getTheme());
        assert vectorDrawableCompat != null;
//        vectorDrawableCompat.setTint(getResources().getColor(R.color.color_blue));
        vectorDrawableCompat.setTint(Color.RED); // int color res value ~ 0x ARGB
        iv_arrow.setImageDrawable(vectorDrawableCompat);
        

Android使用SVG小結
https://blog.csdn.net/dick_zeng/article/details/72473591

Android使用矢量圖(SVG, VectorDrawable)實踐篇
https://www.jianshu.com/p/0555b8c1d26a


 

SVG-Android開源庫——項目簡單接入與使用
https://blog.csdn.net/megatronkings/article/details/52826456

SVG-Android開源庫——圖片顏色Manage、Tint及Selector擴展
https://blog.csdn.net/megatronkings/article/details/52878466

SVG-Android開源庫——關於動畫的使用
https://blog.csdn.net/megatronkings/article/details/53286958

SVG-Android開源庫——SVG生成Vector資源文件的編輯預覽工具
https://blog.csdn.net/megatronkings/article/details/54234394

SVG-Android開源庫——SVG圖片兼容及性能優化解決方案
https://blog.csdn.net/megatronkings/article/details/52454927

SVG_Android github:
https://github.com/MegatronKing/SVG-Android

SVG-Sample地址:
https://github.com/MegatronKing/SVG-Android/tree/master/svg-sample


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM