Android物联网应用程序开发(智慧城市)—— 摄像头监控界面开发
2024-08-30 22:14:02
效果:
布局代码:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
tools:context=".CameraMonitoring">
<!--视频监视文字图片-->
<ImageView
android:id="@+id/imageView1"
android:layout_width="20dp"
android:layout_height="70dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="30dp"
android:src="@drawable/bg_environment"/>
<!--总体布局-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_environment"
android:padding="30dp"
android:layout_marginTop="20dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="20dp"
android:layout_toRightOf="@+id/imageView1"
android:orientation="horizontal">
<!--两个线性布局管理器中的左边一个-->
<LinearLayout
android:layout_width="0.0dp"
android:layout_height="fill_parent"
android:layout_weight="2">
<!--WebView控件-->
<WebView
android:id="@+id/webView1"
android:layout_width="match_parent"
android:layout_height="match_parent">
</WebView>
</LinearLayout>
<!--两个线性布局管理器中的右边一个-->
<LinearLayout
android:layout_width="0.0dp"
android:layout_height="fill_parent"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center">
<!--相对布局管理器,添加4个ImageView控制上下左右-->
<RelativeLayout
android:layout_width="150dp"
android:layout_height="150dp"
android:background="@drawable/btn__presss_bg">
<!--右-->
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:src="@drawable/btn_left_direction"/>
<!--下-->
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="10dp"
android:src="@drawable/btn_down_presss"/>
<!--上-->
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:src="@drawable/btn_up_press"/>
<!--左-->
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="10dp"
android:src="@drawable/btn_right_presss"/>
</RelativeLayout>
<!--拍照按钮-->
<Button
android:layout_width="wrap_content"
android:layout_height="35dp"
android:background="@color/red"
android:textColor="@color/white"
android:layout_marginTop="20dp"
android:text="拍照"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
最新文章
- jquery学习(一)
- volatile关键字 学习记录1
- 四核RP4412开发板使用Xshell连接的com口应与电脑端口一致
- 基于php的snmp管理端开发
- oracle字符函数
- iOS:app直播---采集篇
- 筛选DataTable数据的方法
- 17.1 Replication Configuration 复制配置
- POJ1845 数论 二分快速取余
- 将宿主机东西拷贝到dokcer容器中去
- 什么是MemCache
- php多图合并
- JQ与AJAX 省市区三级联动下拉框
- 数的计数(number)
- python崩溃到现在居然还没有放弃的Day07
- PAT 1006 换个格式输出整数
- 移植并修改成功的模拟iic读写EEPROM at24c02
- MySql循环语句
- IIS URL Rewrite Module的防盗链规则设置
- 后台生成excel前端下载