I am using SVGImageview for displaying SVG image but it is not occupying the whole screen as shown below:
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//ImageView imageView = (ImageView)findViewById(R.id.imageView);
//imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
//imageView.setAdjustViewBounds(true);
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<com.caverock.androidsvg.SVGImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/ic_load_bg"
android:scaleType="fitXY">
</com.caverock.androidsvg.SVGImageView>
</LinearLayout>
Can someone help me how to do this for any screen size? I found this link to be similar to what I am trying to do here but it didn't give me any hints.