VideoView is not displayed on a Fragment

后端 未结 3 909
走了就别回头了
走了就别回头了 2021-02-14 04:43

I have a problem in running a video in Samsung S3(Android 4.1.1), the issue seems to be because the videoview is on a fragment because if I put it on and activity, it works. Als

3条回答
  •  醉梦人生
    2021-02-14 05:27

    If hardware acceleration fixes your issue then I would enable it for that view/window on that device.

    In general I've found that when code works on one device but not another it is typically caused by one of the following problems:

    1. Bug in the manufacturer's API implementation
    2. Different interpretation of the API by the manufacturer
    3. Concurrency problem (e.g. race condition, improper synchronization) in your own code that happens to trigger more frequently on a particular device

    As far as I can tell you seem to be using the UI thread appropriately so I would imagine your issue falls into one of the first two categories and you'll just need to work around it.

提交回复
热议问题