VideoView不会变为不可见

时间:2019-06-20 06:37:29

标签: android visibility android-videoview

当我在AVD(Pixel 2 API 28 / Android 9.0)上运行时,VideoView变为不可见 但是当我在智能手机(银河系2 / Android 8.1)上运行时,VideoView不会变为不可见

此activity_main.xml

    <VideoView
    android:id="@+id/videoView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:visibility="invisible"/>

这是MainActivity

Log.d("체크","------------------------------------------------------------------");
videoView.setVisibility(View.INVISIBLE);
 Log.d("체크","------------------------------------------------------------------");

这是Log(AVD)

  

2019-06-20 15:40:05.465 907-995 / com.example.darimvrvideo_notVRjustVIDEO_v6 D /체크:------------------------ ------------------------------------------   2019-06-20 15:40:05.560 907-995 / com.example.darimvrvideo_notVRjustVIDEO_v6 V / MediaPlayer:resetDrmState:mDrmInfo = null mDrmProvisioningThread = null mPrepareDrmInProgress = false mActiveDrmScheme = false   2019-06-20 15:40:05.560 907-995 / com.example.darimvrvideo_notVRjustVIDEO_v6 V / MediaPlayer:cleanDrmObj:mDrmObj = null mDrmSessionId = null   2019-06-20 15:40:05.563 907-995 / com.example.darimvrvideo_notVRjustVIDEO_v6 V / MediaPlayer:resetDrmState:mDrmInfo = null mDrmProvisioningThread = null mPrepareDrmInProgress = false mActiveDrmScheme = false   2019-06-20 15:40:05.563 907-995 / com.example.darimvrvideo_notVRjustVIDEO_v6 V / MediaPlayer:cleanDrmObj:mDrmObj = null mDrmSessionId = null   2019-06-20 15:40:05.565 907-995 / com.example.darimvrvideo_notVRjustVIDEO_v6 D /체크:--------------------------- ---------------------------------------

这是对数(银河系2)

  

2019-06-20 15:24:36.670 29323-29972 / com.example.darimvrvideo_notVRjustVIDEO_v6 D /체크:------------------------ ------------------------------------------   2019-06-20 15:24:36.670 29323-29407 / com.example.darimvrvideo_notVRjustVIDEO_v6 V / MediaPlayerNative:收到消息msg = 7,ext1 = 0,ext2 = 0   2019-06-20 15:24:36.670 29323-29407 / com.example.darimvrvideo_notVRjustVIDEO_v6 V / MediaPlayerNative:无法识别的消息:(7,0,0)   2019-06-20 15:24:36.671 29323-29407 / com.example.darimvrvideo_notVRjustVIDEO_v6 V / MediaPlayerNative:回调应用程序   2019-06-20 15:24:36.671 29323-29407 / com.example.darimvrvideo_notVRjustVIDEO_v6 V / MediaPlayerNative:从回调返回   2019-06-20 15:24:36.681 29323-29323 / com.example.darimvrvideo_notVRjustVIDEO_v6 V / MediaPlayerNative:使用缓存的搜索位置:0   2019-06-20 15:24:36.681 29323-29323 / com.example.darimvrvideo_notVRjustVIDEO_v6 V / MediaPlayer-JNI:getCurrentPosition:0(msec)   2019-06-20 15:24:36.688 29323-29972 / com.example.darimvrvideo_notVRjustVIDEO_v6 D / SurfaceView:BG hide()Surface(name = Background for-SurfaceView-com.example.darimvrvideo_notVRjustVIDEO_v6 / com.example.darimvrvideo_notVRjustVIDEO_Main6。 596748e @ 0)是否android.widget.VideoView {596748e IFE ... .... 0,0-1280,672#7f07009c app:id / videoView}   2019-06-20 15:24:36.727 29323-29972 / com.example.darimvrvideo_notVRjustVIDEO_v6 D / SurfaceView:surfaceDestroyed 1#8 android.widget.VideoView {596748e IFE ............ I。 0,0-1280,672#7f07009c app:id / videoView}   2019-06-20 15:24:36.733 29323-29972 / com.example.darimvrvideo_notVRjustVIDEO_v6 V / MediaPlayer-JNI:重置   2019-06-20 15:24:36.733 29323-29972 / com.example.darimvrvideo_notVRjustVIDEO_v6 V / MediaPlayerNative:重置   2019-06-20 15:24:36.741 29323-29407 / com.example.darimvrvideo_notVRjustVIDEO_v6 V / MediaPlayerNative:收到消息msg = 8,ext1 = 0,ext2 = 0   2019-06-20 15:24:36.788 29323-29972 / com.example.darimvrvideo_notVRjustVIDEO_v6 V / MediaPlayer:resetDrmState:mDrmInfo = null mDrmProvisioningThread = null mPrepareDrmInProgress = false mActiveDrmScheme = false   2019-06-20 15:24:36.788 29323-29972 / com.example.darimvrvideo_notVRjustVIDEO_v6 V / MediaPlayer:cleanDrmObj:mDrmObj = null mDrmSessionId = null   2019-06-20 15:24:36.789 29323-29407 / com.example.darimvrvideo_notVRjustVIDEO_v6 V / MediaPlayerNative:断开媒体播放器上的notify(8,0,0)回调   2019-06-20 15:24:36.789 29323-29407 / com.example.darimvrvideo_notVRjustVIDEO_v6 V / MediaPlayerNative:收到消息msg = 4,ext1 = 0,ext2 = 0   2019-06-20 15:24:36.789 29323-29407 / com.example.darimvrvideo_notVRjustVIDEO_v6 V / MediaPlayerNative:断开媒体播放器上的notify(4,0,0)回调   2019-06-20 15:24:36.790 29323-29972 / com.example.darimvrvideo_notVRjustVIDEO_v6 V / MediaPlayer:resetDrmState:mDrmInfo = null mDrmProvisioningThread = null mPrepareDrmInProgress = false mActiveDrmScheme = false   2019-06-20 15:24:36.791 29323-29972 / com.example.darimvrvideo_notVRjustVIDEO_v6 V / MediaPlayer:cleanDrmObj:mDrmObj = null mDrmSessionId = null   2019-06-20 15:24:36.791 29323-29972 / com.example.darimvrvideo_notVRjustVIDEO_v6 V / MediaPlayer-JNI:发布   2019-06-20 15:24:36.791 29323-29972 / com.example.darimvrvideo_notVRjustVIDEO_v6 V / MediaPlayerNative:setListener   2019-06-20 15:24:36.791 29323-29972 / com.example.darimvrvideo_notVRjustVIDEO_v6 V / MediaPlayerNative:断开连接   2019-06-20 15:24:36.791 29323-29972 / com.example.darimvrvideo_notVRjustVIDEO_v6 V / MediaPlayerNative:析构函数   2019-06-20 15:24:36.792 29323-29972 / com.example.darimvrvideo_notVRjustVIDEO_v6 V / MediaPlayerNative:断开连接   2019-06-20 15:24:36.795 29323-29972 / com.example.darimvrvideo_notVRjustVIDEO_v6 D / SurfaceView:BG destroy()Surface(name = Background for-SurfaceView-com.example.darimvrvideo_notVRjustVIDEO_v6 / com.example.darimvrvideo_notVRjustVIDEO_Main6。 596748e @ 0)android.widget.VideoView {596748e IFE ... ...... I。 0,0-1280,672#7f07009c app:id / videoView}   2019-06-20 15:24:36.795 29323-29972 / com.example.darimvrvideo_notVRjustVIDEO_v6 D /체크:--------------------------- ---------------------------------------

0 个答案:

没有答案