Creating Svg images reduces the effort of putting different resolution drawable (png's).
Steps to Create Svg images.
- Right Click on drawable folder,Select New ,Select Vector Image. (view attachment vector_asset.png).
- Choose the material icon / local svg(view attachment vector_asset2.png ) .
- Name your resource file (view attachment vector_asset.3png).
- Click next and Finish.
You will find new xml file in your drawable (ic_aspect_ratio_24dp in my case).
Add the generated xml to your source or background.
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imgThum"
android:src="@drawable/ic_aspect_ratio_24dp"
android:layout_below="@+id/btn_camera"
/>
It will supports all the resolution .
Thanks
0 Comment(s)