Android物联网应用程序开发(智慧城市)—— 摄像头监控界面开发「建议收藏」

Android物联网应用程序开发(智慧城市)—— 摄像头监控界面开发「建议收藏」效果:布局代码:<?xmlversion=”1.0″encoding=”utf-8″?><RelativeLayoutxmlns: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

大家好,又见面了,我是你们的朋友全栈君。

效果:

Android物联网应用程序开发(智慧城市)—— 摄像头监控界面开发「建议收藏」

布局代码:

<?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>

 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/150457.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • javaclasscastexception Scala_java unchecked cast object to T

    javaclasscastexception Scala_java unchecked cast object to T在处理JSON时将一个JSONArray强转成List,在线上环境运行正常,但是换了一个环境就出现ClassCastException这个异常。编译时这个强转不会报错,但是运行时却可能出现异常。所以在对对象进行强制转换的时候一定要加以小心,想好实际的对象类型是什么,可不可以强转。

    2025年8月28日
    4
  • matplotlib的安装教程以及简单调用

    matplotlib的安装教程以及简单调用1.matplotlib的下载我们的常规下载方式就是在命令行中输入:`pipinstallmatplotlib`,这样你就可以从官方进行下载,但是这样的下载速度是十分的慢的,我们在最详细的AnacondaInstallers的安装【numpy,jupyter】(图+文)(https://chen-ac.blog.csdn.net/article/details/122374025?spm=1001.2014.3001.5502)这一博客中曾写到,可以在`pipinstallmatplo

    2022年6月15日
    43
  • enum和int、string的转换操作

    enumCountries{中国=5,美国,俄罗斯,英国,法国}enum和intenum->intintnum=(int)Countries.中国; 

    2021年12月25日
    61
  • 工具说明书格式_lastingfor什么药

    工具说明书格式_lastingfor什么药下载安装:Downloads-DBBrowserforSQLitehttps://sqlitebrowser.org/dl/下载64位安装版:DB.Browser.for.SQLite-3.12.2-win64.msiZip文件是免安装解压缩版,PortableApp是一个exe文件打包版。安装完,打开后是这个样子:点击上面红框处,新建一个database,选择路径,输入文件名,保存即可。在SQLite里,一个database就是一个后缀db的文…

    2022年9月8日
    3
  • vim复制粘贴_vim怎么复制粘贴到其他程序

    vim复制粘贴_vim怎么复制粘贴到其他程序Vim复制粘贴探秘Vim作为最好用的文本编辑器之一,使用vim来编文档,写代码实在是很惬意的事情。每当学会了vim的一个新功能,就会很大地提高工作效率。有人使用vim几十年,还没有完全掌握vim的功能,这也说明了vim的强大。而这样何尝不是一件好事呢,只要有的学习,就有的提高。最近使用Vim来写博客,发现在Vim中粘贴Python代码后,缩进就全乱了。仔细研究了以下,原来是自动缩进的缘故,于是做如下设置::setnoainosi取消了自动缩进和智能缩进,这样粘贴就不会错行了。但

    2022年9月13日
    1
  • 论坛提问艺术

    论坛提问艺术1明确自己所提的问题是什么,尽可能将问题描述清楚,可以适当加点图形之类的工具辅助一下。2明确问题的类型,然后到正确的论坛提问3标题能够概括所提问题的主要意思4提问要文明礼貌5回答之后要表示感谢…

    2022年6月23日
    22

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号