在Android

时间:2017-02-13 12:53:01

标签: android android-fragments

我正在开发一个应用程序,在一个屏幕上显示带有多个视频源的RTSP流。我使用LibVLC框架,并在一个屏幕上实现多个视频表面,我使用片段。这些片段存储在网格状容器内,如下所示:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:id="@+id/video_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1.0"
        android:orientation="horizontal">

        <FrameLayout
            android:id="@+id/video_container_1"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_margin="5dp"
            android:layout_weight="1.0">
        </FrameLayout>

        <FrameLayout
            android:id="@+id/video_container_2"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_margin="5dp"
            android:layout_weight="1.0"
            android:orientation="horizontal">

            <ImageView
                android:id="@+id/imageView"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:src="@drawable/store_17" />
        </FrameLayout>

    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1.0"
        android:orientation="horizontal">

        <FrameLayout
            android:id="@+id/video_container_3"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_margin="5dp"
            android:layout_weight="1.0">
        </FrameLayout>

        <FrameLayout
            android:id="@+id/video_container_4"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_margin="5dp"
            android:layout_weight="1.0">
        </FrameLayout>

    </LinearLayout>
</LinearLayout>

我需要使用拖放来改变视频片段的位置。任何想法我怎样才能实现这一目标?

0 个答案:

没有答案