android background image slows down app

后端 未结 6 1573
栀梦
栀梦 2020-12-09 21:32

I am using a viewpager to swipe amongst fragments in my app. I define the background in the XML, so

android:background=\"@drawable/bg_final\"
6条回答
  •  被撕碎了的回忆
    2020-12-09 21:36

    The reason for this could be that the image is being stretched, and Android has performance issues with stretching background images.

    Instead, you should either replace the background image with either a background color or see this answer to have the image repeat instead of stretch.

提交回复
热议问题