144 lines
5.0 KiB
XML
144 lines
5.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
|
|
<!-- 设置面板 -->
|
|
<LinearLayout
|
|
android:id="@+id/setup_panel"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:gravity="center_vertical"
|
|
android:orientation="vertical"
|
|
android:padding="24dp">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="24dp"
|
|
android:text="WebRTC 控制端"
|
|
android:textSize="24sp"
|
|
android:textStyle="bold" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="信令服务器地址:"
|
|
android:textSize="14sp" />
|
|
|
|
<EditText
|
|
android:id="@+id/et_server_url"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="16dp"
|
|
android:hint="ws://175.178.213.60:8088/ws/signal"
|
|
android:inputType="textUri" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="本机设备ID:"
|
|
android:textSize="14sp" />
|
|
|
|
<EditText
|
|
android:id="@+id/et_device_id"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="16dp"
|
|
android:hint="设备ID"
|
|
android:inputType="text" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="目标被控设备ID:"
|
|
android:textSize="14sp" />
|
|
|
|
<EditText
|
|
android:id="@+id/et_target_device_id"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="24dp"
|
|
android:hint="被控端设备ID"
|
|
android:inputType="text"
|
|
android:text="981964879" />
|
|
|
|
<TextView
|
|
android:id="@+id/tv_status"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="24dp"
|
|
android:text="状态: 已停止"
|
|
android:textSize="16sp"
|
|
android:textStyle="bold" />
|
|
|
|
<Button
|
|
android:id="@+id/btn_connect"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="8dp"
|
|
android:text="连接被控设备" />
|
|
|
|
<Button
|
|
android:id="@+id/btn_disconnect"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:enabled="false"
|
|
android:text="断开连接" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- 控制面板(连接后显示) -->
|
|
<FrameLayout
|
|
android:id="@+id/control_panel"
|
|
android:background="#000000"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:visibility="gone">
|
|
|
|
<!-- 远端视频渲染 -->
|
|
<org.webrtc.SurfaceViewRenderer
|
|
android:id="@+id/remote_video_view"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_gravity="center" />
|
|
|
|
<!-- 触摸控制层(覆盖在视频上方) -->
|
|
<com.ttstd.controller.view.RemoteTouchView
|
|
android:id="@+id/touch_overlay"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_gravity="center"
|
|
android:background="@android:color/transparent" />
|
|
|
|
<!-- 顶部状态栏 -->
|
|
<LinearLayout
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="top|start"
|
|
android:background="#80000000"
|
|
android:orientation="vertical"
|
|
android:padding="8dp">
|
|
|
|
<TextView
|
|
android:id="@+id/tv_status_control"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="远程控制中"
|
|
android:textColor="@android:color/white"
|
|
android:textSize="14sp" />
|
|
|
|
<TextView
|
|
android:id="@+id/tv_stats"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="分辨率: - 帧率: - 延迟: -"
|
|
android:textColor="@android:color/white"
|
|
android:textSize="12sp" />
|
|
|
|
</LinearLayout>
|
|
|
|
</FrameLayout>
|
|
|
|
</FrameLayout>
|