Hello. It was necessary to make an activity with a video in full screen and on top of it a crawl line. I realized all this, but when you need to play videos of a larger size (up to 1080p), everything lags terribly, sometimes it slips
I / Choreographer: Skipped 38 frames! The application may be doing too much work on its main thread.
The code for the application is the simplest:
<VideoView android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/videoView" /> <TextView android:id="@+id/textView" android:singleLine="true" android:ellipsize="marquee" android:marqueeRepeatLimit="marquee_forever" android:layout_height="30dp" android:layout_width="match_parent"> </TextView> Activity code:
VideoView videoView = (VideoView)findViewById(R.id.videoView); videoView.setVideoPath("android.resource://" + getPackageName() + "/" + R.raw.video); videoView.setMediaController(new MediaController(this)); videoView.requestFocus(0); videoView.start(); mText = (TextView) findViewById(R.id.textView); mText.setText("Много текста "); mText.setSelected(true); AndroidTV application, so you need to play such a high-quality video. I tried VideoView, mediaplayer + surfaceView, and exoPlayer. Actually the question is: what can be done with this so that the application does not slow down?