Android layout collapse

断了今生、忘了曾经 提交于 2019-12-04 17:16:05

Your layout seems to be correct. It might be broken from the libs. It already has 1k+ issues.

Maybe you can use a custom dialog that has the video in it and show that dialog. This way the video will be in front of the images. Then you can try to remove the shadow or bgColor = transparent, so that the user might not realise that is a dialog. This hack may work.

 <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="match_parent">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:ignore="UselessParent">

        <!-- This could be your fragment container, or something -->

        <org.xwalk.core.XWalkView xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/xWalkView"
            android:layout_width="fill_parent"
            android:layout_height="160dp"
            android:background="@color/blue"
            android:elevation="5dp"
            android:isScrollContainer="true">

        </org.xwalk.core.XWalkView>

        <com.xxxxxx.app.widget.media.IjkVideoView
            android:id="@+id/video_view"
            android:layout_width="200dp"
            android:layout_height="200dp"
            android:elevation="10dp"
            android:layout_alignParentTop="true"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="72dp"
            android:background="@color/colorAccent" />

        <com.roughike.bottombar.BottomBar
            android:id="@+id/bottomBar"
            android:layout_width="match_parent"
            android:layout_height="60dp"
            android:elevation="5dp"
            android:layout_alignParentBottom="true"
            app:bb_tabXmlResource="@xml/web_tabs" />

    </RelativeLayout>
</LinearLayout>

Try this layout i modify it with elevation may it will help you.I have same problem by using elevation it solve.

I think it is due to relative layout. Why don't you try this code by using the Frame Layout. The most convenient and maintainable way to design application user interfaces is by creating XML layout resources. This method greatly simplifies the User Interface design process, moving much of the static creation and layout of user interface controls and definition of control attributes, to the XML, instead of littering the code.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="vertical" 
    android:layout_width="match_parent"
    android:layout_height="match_parent">

<FrameLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" >
    <org.xwalk.core.XWalkView 
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/xWalkView"
        android:layout_width="fill_parent"
        android:layout_height="160dp"
        android:background="@color/blue"
        android:isScrollContainer="true">
    </org.xwalk.core.XWalkView>

    <com.xxxxxx.app.widget.media.IjkVideoView
        android:id="@+id/video_view"
        android:layout_width="200dp"
        android:layout_height="200dp"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="72dp"
        android:layout_gravity="Bottom"
        android:gravity="center"
        android:background="@color/colorAccent" />

    <com.roughike.bottombar.BottomBar
        android:id="@+id/bottomBar"
        android:layout_width="match_parent"
        android:layout_height="60dp"
        android:layout_alignParentBottom="true"
        app:bb_tabXmlResource="@xml/web_tabs" />

       </FrameLayout>
  </LinearLayout>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!