vector drawable on floating action button in bottom app bar getting distorted

时间:2019-04-08 13:25:33

标签: android floating-action-button android-bottomappbar

This is the xml code for my floating action button

<com.google.android.material.floatingactionbutton.FloatingActionButton
                    android:id="@+id/setWallpaper"
                    app:fabCustomSize="65dp"
                    app:maxImageSize="50dp"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    app:srcCompat="@drawable/ic_camera_lens"
                    app:backgroundTint="@color/disabled_background"
                    app:elevation="0dp"
                    app:layout_anchor="@id/bottomAppBar"/>

On some devices the image getting distorted like this

https://imgur.com/ECqppI9

whereas when i see the page in preview and on some other devices it looks perfectly fine

https://imgur.com/DTX6PSY

SVG i am using has no problem, its 2000*2000

0 个答案:

没有答案