google-tv

Android ListView item selection issue

谁说胖子不能爱 提交于 2019-12-01 11:41:38
I have two ListView in an XML, namely lvPrograms & lvEpisodes . They are placed horizontally. I fill these ListViews from a web service. When the Activity loads, i call the web service to get data for lvPrograms . when i receive Programs , i then load the Episodes for the first program in the retrieved list. and set the lvPrograms 's first item as selected/highlighted, to show user that the loaded Episodes are for this Program item. I set it as follows: private void highlightSelectedProgram(int _previousSelectedProgramIndex, int _currentSelectedProgramIndex) { ListView allProgramsList =

Android MediaPlayer/VideoView w/Subtitles (SRT)

十年热恋 提交于 2019-11-30 00:39:57
Does Android's MediaPlayer support SRT subtitles? I've attempted to place the SRT file in the same directory as the video file and name it the same (with the exception of the extension of course), but haven't had any luck getting them to display. Any thoughts, recommendations? Android 4.0.x version and below In case of Android 4.0 version and below, default Media Player did not support subtitles. There are third party player apps available in Google Play which support subtitles. One of them is MoboPlayer If you are planning to do it using code, the following link is a good resource http://www

Identify GoogleTv from Android app

家住魔仙堡 提交于 2019-11-29 06:37:25
Is there a way for an Android app to tell in the Java code if it is running on GoogleTV vs tablets or phones? The following link might help you: Google TV Android Developer's Guide To optimize your app for a Google TV, just add an additional layour for large screens. However, if you want to determine the device that is currently using the app at runtime, you could try the hasSystemFeature() method. With this you can test for certain hardware features that are unique to Google TV (e.g. you could test for FEATURE_TOUCHSCREEN, as any device but Google TV has one <=> if the feature is not

How do I get the OnClickListener working on a custom view with a RelativeLayout?

我的未来我决定 提交于 2019-11-29 01:29:23
Question Hello, i have built a custom view with a RelativeLayout to use it as custom image button. So far, selecting it works (PIC2) and even when I click it (using GoogleTV Remote), the view successfully changes it's state to PIC3 (thanks to android:duplicateParentState="true" ) But unfortunately the onClickListener does not fire (doesn't matter if I click the View with the Remote "OK" Button or I use the touchpad..) I really need the same behavior like a normal button. How to accomplish that? I already spent a few hours on searching Google and StackOverflow... (BTW. when setting android

Android MediaPlayer/VideoView w/Subtitles (SRT)

走远了吗. 提交于 2019-11-28 21:34:37
问题 Does Android's MediaPlayer support SRT subtitles? I've attempted to place the SRT file in the same directory as the video file and name it the same (with the exception of the extension of course), but haven't had any luck getting them to display. Any thoughts, recommendations? 回答1: Android 4.0.x version and below In case of Android 4.0 version and below, default Media Player did not support subtitles. There are third party player apps available in Google Play which support subtitles. One of

Converting from GLSurfaceView to TextureView (via GLTextureView)

点点圈 提交于 2019-11-26 12:00:49
问题 When Android 4.0 (Ice Cream Sandwich) was released, a new view was introduced into the sdk. This View is the TextureView. In the documentation, it says that the TextureView can be used to display content for an OpenGL scene. When you look up how to do this, you\'ll find this link to one example. https://groups.google.com/forum/?fromgroups=#!topic/android-developers/U5RXFGpAHPE However I wanted to just replace GLSurfaceView with TextureView, and keep the rest of my code the same, and just