Android Activity slow on 4.3 device

前端 未结 2 1866
死守一世寂寞
死守一世寂寞 2021-01-25 13:40

I developed an app that would stream videos from the web. I have an activity that lists the videos including their icons, titles and status (newly updated). For every row, there

2条回答
  •  伪装坚强ぢ
    2021-01-25 13:41

    I noticed performance issues on the HTC one when going from 4.1 to 4.3 or 4.2. Disabling hardware acceleration actually improved performance on many pages when using the HTC One. You can try disabling hardware acceleration in your manifest and then enabling it for all devices but the HTC one in your main activities.

    Other devices had great performance for the same pages with hardware acceleration enabled. It's only the HTC one that struggled and needed the below code:

    if(!(android.os.Build.MODEL.equalsIgnoreCase("HTC One") && Integer.parseInt(android.os.Build.VERSION.SDK) == 18)) { getWindow().setFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED, WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED); }

提交回复
热议问题