SurfaceView in widget

十年热恋 提交于 2019-12-11 02:26:10

问题


I am implementing a widget for TV application in which I want to show streaming so I have to place SurfaceView in it. As widget has RemoteViews, how can I use SurfaceView to set value of SurfaceHolder? I have defined SurfaceView in xml. I have searched on internet but didn't find any help. I want instance of SurfaceView so that I can play with it.


回答1:


As widget has RemoteViews, how can I use SurfaceView

That is not possible. SurfaceView is not available for use with app widgets, as is covered in the documentation.

Any alternative for SurfaceView

It is not possible to show a video from an app widget. At best, you can try to write your own home screen implementation that does this.



来源:https://stackoverflow.com/questions/24732762/surfaceview-in-widget

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!