简体   繁体   中英

Android xml arrow with two heads

I was searching in the inte.net and did not find a solution for such xml drawable.

Simply I want to create such horizontal arrow with two heads https://cdn4.iconfinder.com/data/icons/universal-3-2/16/143-512.png . How to do that in xml?

Thank you everybody for help.

This kinda thing?

<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportWidth="24"
    android:viewportHeight="24">
  <group android:scaleX="0.046871338"
      android:scaleY="0.046871338">
    <path
        android:pathData="M508.93,248.35L402.27,141.69c-4.27,-4.05 -10.99,-3.95 -15.04,0.21c-3.95,4.16 -3.95,10.67 0,14.83l88.43,88.43H36.4l88.43,-88.43c4.05,-4.27 3.95,-10.99 -0.21,-15.04c-4.16,-3.95 -10.67,-3.95 -14.83,0L3.12,248.35c-4.16,4.16 -4.16,10.88 0,15.04L109.79,370.06c4.27,4.05 10.99,3.95 15.04,-0.21c3.95,-4.16 3.95,-10.67 0,-14.83L36.4,266.59h439.15L387.12,355.02c-4.27,4.05 -4.37,10.88 -0.21,15.04c4.05,4.27 10.88,4.37 15.04,0.21c0.11,-0.11 0.21,-0.21 0.21,-0.21l106.67,-106.67C513.09,259.34 513.09,252.51 508.93,248.35z"
        android:fillColor="#000000"/>
  </group>
</vector>

双端箭头xml

For the future (or if you want something slightly different ), here's how to get it:

  1. Find an SVG with appropriate licensing (one linked above is CC0).
  2. Download it.
  3. Import the SVG , it'll be converted to an XML drawable automatically.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM