tcking / GiraffePlayer

android video player base on ijkplayer
Apache License 2.0
681 stars 199 forks source link

全屏后虚拟按键将布局覆盖 #40

Open lisnstatic opened 8 years ago

lisnstatic commented 8 years ago

全屏后,屏幕右侧的三个虚拟按键覆盖在播放器上面,导致播放器右侧的控件被覆盖无法使用,请问有什么办法解决吗?

tcking commented 8 years ago

GiraffePlayer.doOnConfigurationChangedwidthPixels的值减去虚拟导航栏的高度试试

lisnstatic commented 8 years ago

还有个问题就是,我有一个自定义view,要放到IjkVideoView上面但是要在返回按键,进度条等布局下面。可是不论我怎么放,只要我的自定义view是match_parent的,返回按键进度条等布局就不显示,外层布局改为FrameLayout也不管用

tcking commented 8 years ago

可以在giraffe_player.xml里加

lisnstatic commented 8 years ago

是在giraffe_player.xml 里加的 <FrameLayout android:id="@+id/app_video_box" xmlns:android="http://schemas.android.com/apk/res/android" android:background="#000" android:layout_width="match_parent" android:layout_height="match_parent">

<tcking.github.com.giraffeplayer.IjkVideoView
    android:id="@+id/video_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    />
<master.flame.danmaku.ui.widget.DanmakuView
    android:id="@+id/sv_danmaku"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#000"
    android:gravity="center"
    android:visibility="visible"/>

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:id="@+id/app_video_replay"
        android:gravity="center"
        android:visibility="gone"
        android:background="#B3616161"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

...... 其中danmu那个view是我加的

tcking commented 8 years ago

在手机的debug选项里,打开显示布局边界看看