158 lines
5.5 KiB
XML
158 lines
5.5 KiB
XML
|
|
<?xml version="1.0" encoding="utf-8"?>
|
||
|
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||
|
|
android:layout_width="match_parent"
|
||
|
|
android:layout_height="match_parent"
|
||
|
|
android:orientation="vertical"
|
||
|
|
android:padding="16dp"
|
||
|
|
android:background="@android:color/white">
|
||
|
|
|
||
|
|
<!-- 标题 -->
|
||
|
|
<TextView
|
||
|
|
android:layout_width="match_parent"
|
||
|
|
android:layout_height="wrap_content"
|
||
|
|
android:text="屏幕捕获示例"
|
||
|
|
android:textSize="24sp"
|
||
|
|
android:textStyle="bold"
|
||
|
|
android:textColor="@android:color/black"
|
||
|
|
android:gravity="center"
|
||
|
|
android:layout_marginBottom="24dp" />
|
||
|
|
|
||
|
|
<!-- 服务器控制区域 -->
|
||
|
|
<LinearLayout
|
||
|
|
android:layout_width="match_parent"
|
||
|
|
android:layout_height="wrap_content"
|
||
|
|
android:orientation="vertical"
|
||
|
|
android:background="@android:color/holo_blue_light"
|
||
|
|
android:padding="16dp"
|
||
|
|
android:layout_marginBottom="16dp">
|
||
|
|
|
||
|
|
<TextView
|
||
|
|
android:layout_width="match_parent"
|
||
|
|
android:layout_height="wrap_content"
|
||
|
|
android:text="服务器控制"
|
||
|
|
android:textSize="18sp"
|
||
|
|
android:textStyle="bold"
|
||
|
|
android:textColor="@android:color/white"
|
||
|
|
android:layout_marginBottom="8dp" />
|
||
|
|
|
||
|
|
<Button
|
||
|
|
android:id="@+id/startServerButton"
|
||
|
|
android:layout_width="match_parent"
|
||
|
|
android:layout_height="56dp"
|
||
|
|
android:text="启动服务器"
|
||
|
|
android:textSize="16sp"
|
||
|
|
android:background="@android:color/holo_green_dark"
|
||
|
|
android:textColor="@android:color/white" />
|
||
|
|
|
||
|
|
</LinearLayout>
|
||
|
|
|
||
|
|
<!-- 屏幕捕获控制区域 -->
|
||
|
|
<LinearLayout
|
||
|
|
android:layout_width="match_parent"
|
||
|
|
android:layout_height="wrap_content"
|
||
|
|
android:orientation="vertical"
|
||
|
|
android:background="@android:color/holo_orange_light"
|
||
|
|
android:padding="16dp"
|
||
|
|
android:layout_marginBottom="16dp">
|
||
|
|
|
||
|
|
<TextView
|
||
|
|
android:layout_width="match_parent"
|
||
|
|
android:layout_height="wrap_content"
|
||
|
|
android:text="屏幕捕获控制"
|
||
|
|
android:textSize="18sp"
|
||
|
|
android:textStyle="bold"
|
||
|
|
android:textColor="@android:color/white"
|
||
|
|
android:layout_marginBottom="8dp" />
|
||
|
|
|
||
|
|
<LinearLayout
|
||
|
|
android:layout_width="match_parent"
|
||
|
|
android:layout_height="wrap_content"
|
||
|
|
android:orientation="horizontal"
|
||
|
|
android:layout_marginBottom="8dp">
|
||
|
|
|
||
|
|
<Button
|
||
|
|
android:id="@+id/startCaptureButton"
|
||
|
|
android:layout_width="0dp"
|
||
|
|
android:layout_height="48dp"
|
||
|
|
android:layout_weight="1"
|
||
|
|
android:text="开始捕获"
|
||
|
|
android:textSize="14sp"
|
||
|
|
android:background="@android:color/holo_green_dark"
|
||
|
|
android:textColor="@android:color/white"
|
||
|
|
android:layout_marginEnd="8dp" />
|
||
|
|
|
||
|
|
<Button
|
||
|
|
android:id="@+id/stopCaptureButton"
|
||
|
|
android:layout_width="0dp"
|
||
|
|
android:layout_height="48dp"
|
||
|
|
android:layout_weight="1"
|
||
|
|
android:text="停止捕获"
|
||
|
|
android:textSize="14sp"
|
||
|
|
android:background="@android:color/holo_red_dark"
|
||
|
|
android:textColor="@android:color/white"
|
||
|
|
android:enabled="false" />
|
||
|
|
|
||
|
|
</LinearLayout>
|
||
|
|
|
||
|
|
</LinearLayout>
|
||
|
|
|
||
|
|
<!-- 状态显示区域 -->
|
||
|
|
<LinearLayout
|
||
|
|
android:layout_width="match_parent"
|
||
|
|
android:layout_height="wrap_content"
|
||
|
|
android:orientation="vertical"
|
||
|
|
android:background="@android:color/holo_purple"
|
||
|
|
android:padding="16dp"
|
||
|
|
android:layout_marginBottom="16dp">
|
||
|
|
|
||
|
|
<TextView
|
||
|
|
android:layout_width="match_parent"
|
||
|
|
android:layout_height="wrap_content"
|
||
|
|
android:text="状态信息"
|
||
|
|
android:textSize="18sp"
|
||
|
|
android:textStyle="bold"
|
||
|
|
android:textColor="@android:color/white"
|
||
|
|
android:layout_marginBottom="8dp" />
|
||
|
|
|
||
|
|
<TextView
|
||
|
|
android:id="@+id/statusText"
|
||
|
|
android:layout_width="match_parent"
|
||
|
|
android:layout_height="wrap_content"
|
||
|
|
android:text="服务器状态: 已停止\n捕获状态: 已停止\n客户端数量: 0"
|
||
|
|
android:textSize="14sp"
|
||
|
|
android:textColor="@android:color/white"
|
||
|
|
android:lineSpacingExtra="4dp" />
|
||
|
|
|
||
|
|
</LinearLayout>
|
||
|
|
|
||
|
|
<!-- 性能监控区域 -->
|
||
|
|
<LinearLayout
|
||
|
|
android:layout_width="match_parent"
|
||
|
|
android:layout_height="wrap_content"
|
||
|
|
android:orientation="vertical"
|
||
|
|
android:background="@android:color/holo_green_light"
|
||
|
|
android:padding="16dp">
|
||
|
|
|
||
|
|
<TextView
|
||
|
|
android:layout_width="match_parent"
|
||
|
|
android:layout_height="wrap_content"
|
||
|
|
android:text="性能监控"
|
||
|
|
android:textSize="18sp"
|
||
|
|
android:textStyle="bold"
|
||
|
|
android:textColor="@android:color/black"
|
||
|
|
android:layout_marginBottom="8dp" />
|
||
|
|
|
||
|
|
<TextView
|
||
|
|
android:id="@+id/performanceText"
|
||
|
|
android:layout_width="match_parent"
|
||
|
|
android:layout_height="wrap_content"
|
||
|
|
android:text="性能统计: 0.00 fps, 已编码 0 帧, 丢弃 0 帧"
|
||
|
|
android:textSize="14sp"
|
||
|
|
android:textColor="@android:color/black"
|
||
|
|
android:lineSpacingExtra="4dp" />
|
||
|
|
|
||
|
|
</LinearLayout>
|
||
|
|
|
||
|
|
</LinearLayout>
|
||
|
|
|