compress_config_dialog.xml 10.1 KB
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:padding="10dp">

            <Switch
                android:id="@+id/swEnableHWcode"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textOff="  "
                android:textOn="  "
                android:thumb="@drawable/switch_thumb"
                android:track="@drawable/switch_track"/>

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:text="使用硬件加速"
                android:textColor="#ffffff"
                android:textSize="17dp"/>
        </LinearLayout>

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="5dp">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/compressWatermark"
                android:layout_marginTop="-20dp"
                android:background="@drawable/layout_stroke"
                android:orientation="vertical"
                android:paddingTop="20dp">

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

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_margin="10dp"
                        android:text="x轴:"
                        android:textColor="#ffffff"
                        android:textSize="17dp"/>

                    <EditText
                        android:id="@+id/etCompressWatermarkXAxis"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:layout_marginRight="5dp"
                        android:background="@drawable/layout_stroke"
                        android:gravity="center"
                        android:hint="范围0-1.0"
                        android:inputType="numberDecimal"
                        android:padding="5dp"
                        android:textColor="#ffffff"/>

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_margin="10dp"
                        android:text="y轴:"
                        android:textColor="#ffffff"
                        android:textSize="17dp"/>

                    <EditText
                        android:id="@+id/etCompressWatermarkYAxis"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:layout_marginRight="5dp"
                        android:background="@drawable/layout_stroke"
                        android:gravity="center"
                        android:hint="范围0-1.0"
                        android:inputType="numberDecimal"
                        android:padding="5dp"
                        android:textColor="#ffffff"/>
                </LinearLayout>

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

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_margin="10dp"
                        android:text="x轴缩放比例:"
                        android:textColor="#ffffff"
                        android:textSize="17dp"/>

                    <EditText
                        android:id="@+id/etCompressWatermarkXZoom"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:layout_marginRight="5dp"
                        android:background="@drawable/layout_stroke"
                        android:gravity="center"
                        android:hint="默认为1"
                        android:inputType="numberDecimal"
                        android:padding="5dp"
                        android:textColor="#ffffff"/>
                </LinearLayout>

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

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_margin="10dp"
                        android:text="y轴缩放比例:"
                        android:textColor="#ffffff"
                        android:textSize="17dp"/>

                    <EditText
                        android:id="@+id/etCompressWatermarkYZoom"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:layout_marginRight="5dp"
                        android:background="@drawable/layout_stroke"
                        android:gravity="center"
                        android:hint="默认为1"
                        android:inputType="numberDecimal"
                        android:padding="5dp"
                        android:textColor="#ffffff"/>
                </LinearLayout>
            </LinearLayout>

            <CheckBox
                android:id="@+id/compressWatermark"
                android:layout_width="wrap_content"
                android:layout_height="40dp"
                android:layout_marginLeft="10dp"
                android:background="#000000"
                android:text="视频水印"/>
        </RelativeLayout>

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

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="10dp"
                android:text="码率:"
                android:textColor="#ffffff"
                android:textSize="17dp"/>

            <EditText
                android:id="@+id/etCompressBitRate"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:layout_marginRight="5dp"
                android:background="@drawable/layout_stroke"
                android:gravity="center"
                android:hint="默认为4M,单位M"
                android:inputType="numberDecimal"
                android:padding="5dp"
                android:textColor="#ffffff"/>
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:orientation="horizontal">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="10dp"
                android:text="视频宽度:"
                android:textColor="#ffffff"
                android:textSize="17dp"/>

            <EditText
                android:id="@+id/etCompressVideoWidth"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:layout_marginRight="5dp"
                android:background="@drawable/layout_stroke"
                android:gravity="center"
                android:hint="默认为原始宽高"
                android:numeric="integer"
                android:padding="5dp"
                android:textColor="#ffffff"/>
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:orientation="horizontal">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="10dp"
                android:text="视频高度:"
                android:textColor="#ffffff"
                android:textSize="17dp"/>

            <EditText
                android:id="@+id/etCompressVideoHeight"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:layout_marginRight="5dp"
                android:background="@drawable/layout_stroke"
                android:gravity="center"
                android:hint="默认为原始宽高"
                android:numeric="integer"
                android:padding="5dp"
                android:textColor="#ffffff"/>
        </LinearLayout>
    </LinearLayout>

</ScrollView>