SVG support on Android

前端 未结 11 1921
一向
一向 2020-11-28 23:06

Does Android support SVG? any example?

11条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-28 23:38

    Check out Support vector drawable. Android studio has a tool to convert SVG files to .XML files.

    when using AppCompat with ImageView (or subclasses such as ImageButton and FloatingActionButton), you’ll be able to use the new app:srcCompat attribute to reference vector drawables (as well as any other drawable available to android:src):

    As of Android Support Library 23.3.0, support vector drawables can only be loaded via app:srcCompat or setImageResource()

提交回复
热议问题