Tag:SurfaceView

  • Two surfaceviews to achieve switching effect

    Time:2021-4-17

    Demand:In the video call interface, there are two surfaceviews, one displays the local view and the other displays the opposite view. Due to the problem of display scale, there is always the problem of one covering the other. In order to ensure the user experience, it is required that the small view covers the large […]

  • Android uses surfaceview + mediaplayer to play video

    Time:2021-3-19

    There are two main ways to play video in Android Use its own player. Specify action as action_ View, data is URI and type is its MIME type Using the videoview of Android, this method is too simple to introduce Using surfaceview + mediaplayer, the effect of this method is better, which is also highlighted […]

  • Using surfaceview to realize video barrage

    Time:2021-2-13

    This example for you to share the surfaceview video barrage display specific code, for your reference, the specific content is as follows All codes are as follows: package com.example.app2; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.PixelFormat; import android.graphics.PorterDuff; import android.media.MediaPlayer; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.text.TextUtils; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.View; import android.widget.EditText; […]

  • Android dual surfaceview to achieve barrage effect

    Time:2021-2-12

    This example for you to share the Android dual surfaceview to achieve the barrage effect of the specific code, for your reference, the specific content is as follows Page layout The first is the layout of XML. The general parent layout here is a FrameLayout for pasting two surfaceviews, one for playing video and one […]