125 lines
4.2 KiB
XML
125 lines
4.2 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:orientation="vertical"
|
|
android:padding="24dp"
|
|
android:gravity="center_vertical">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="WebRTC 控制端"
|
|
android:textSize="24sp"
|
|
android:textStyle="bold"
|
|
android:layout_marginBottom="24dp"/>
|
|
|
|
<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:inputType="textUri"
|
|
android:hint="ws://192.168.1.100:8080/ws/signal"
|
|
android:layout_marginBottom="16dp"/>
|
|
|
|
<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:inputType="text"
|
|
android:hint="设备ID"
|
|
android:layout_marginBottom="16dp"/>
|
|
|
|
<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:inputType="text"
|
|
android:hint="被控端设备ID"
|
|
android:layout_marginBottom="24dp"/>
|
|
|
|
<TextView
|
|
android:id="@+id/tv_status"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="状态: 已停止"
|
|
android:textSize="16sp"
|
|
android:textStyle="bold"
|
|
android:layout_marginBottom="24dp"/>
|
|
|
|
<Button
|
|
android:id="@+id/btn_connect"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="连接被控设备"
|
|
android:layout_marginBottom="8dp"/>
|
|
|
|
<Button
|
|
android:id="@+id/btn_disconnect"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="断开连接"
|
|
android:enabled="false"/>
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- 控制面板(连接后显示) -->
|
|
<FrameLayout
|
|
android:id="@+id/control_panel"
|
|
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"/>
|
|
|
|
<!-- 触摸控制层(覆盖在视频上方) -->
|
|
<com.tt.controller.view.RemoteTouchView
|
|
android:id="@+id/touch_overlay"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:background="@android:color/transparent"/>
|
|
|
|
<!-- 顶部状态栏 -->
|
|
<TextView
|
|
android:id="@+id/tv_status_control"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="top|start"
|
|
android:padding="8dp"
|
|
android:background="#80000000"
|
|
android:textColor="@android:color/white"
|
|
android:text="远程控制中"
|
|
android:textSize="14sp"/>
|
|
|
|
</FrameLayout>
|
|
|
|
</FrameLayout>
|