title: Scale svg images in ImageView
body: <p>I have imageViews bound to svg files using <a href="https://github.com/pents90/svg-android" rel="nofollow noreferrer">android-svg</a> lib, which works. Unfortunately, there is an inconsistency in the sizes of the rendered svg images; some fit perfectly, some are super small. I have tried changing various ImageView attributes, but nothing that I have tried fixes the problem.</p>
  
  <p>Is there an attribute that needs to be set that I am missing?</p>
  
  <p>Fragment</p>
  
  <pre><code>@Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
      View v = inflater.inflate(R.layout.fragment_main, container, false);
      ImageView imageView = (ImageView) v.findViewById(R.id.testImage);
  
      SVG homeSvg = SVGParser.getSVGFromString(getResources().getString(R.string.svg));
      imageView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
      imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
      imageView.setAdjustViewBounds(true);
      imageView.setImageDrawable(homeSvg.createPictureDrawable());
  
      return v;
  }
  </code></pre>
  
  <p>Layout</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
      android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivityFragment"&gt;
  
      &lt;FrameLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:background="#FF0000"
          android:padding="10dp"&gt;
  
          &lt;ImageView
              android:id="@+id/testImage"
              android:layout_width="50dp"
              android:layout_height="50dp" /&gt;
  
      &lt;/FrameLayout&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/8Hn4s.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8Hn4s.png" alt="The logo can faintly be seen in the top left corner"></a></p>