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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • Python6大设计原则

    内容总览六大设计原则都有哪些内容详解一、单一职责原则单一职责原则:英文名称是SingleResponsiblityPrinciple,简称是SRP。定义:应该有且仅有一个原因引起类的变更。

    2022年3月29日
    58
  • Python程序中的进程操作

    之前我们已经了解了很多进程相关的理论知识,了解进程是什么应该不再困难了,刚刚我们已经了解了,运行中的程序就是一个进程。所有的进程都是通过它的父进程来创建的。因此,运行起来的python程序也是一个进程

    2022年3月29日
    60
  • selenium 和 IP代理池

    selenium 和 IP代理池3.1seleniumselenium:Selenium是一个自动化测试工具,利用它可以驱动浏览器执行特定的动作,如点击、下拉等操作(模拟浏览器操作)同时还可以获取浏览器当前呈现的页面的源代码,做到可见即可爬Selenium支持非常多的浏览器,如Chrome、Firefox、PhantomJS等浏览器对象的初始化并将其赋值为browser对象。接下来,我们要做的就是调用…

    2022年5月2日
    110
  • Protostuff序列化和反序列化使用说明

    Protostuff序列化和反序列化使用说明google原生的protobuffer使用起来相当麻烦,首先要写.proto文件,然后编译.proto文件,生成对应的.java文件,鄙人试了一次,发现真的很麻烦。而protostuff的官方网站(http://www.protostuff.io/documentation/runtime-schema/),对于智商比较低的小编来说也略显生涩,于是鄙人就根据项目中用到的protostuff,撰写此文,以方便自己和他人加深印象和学习。

    2022年6月17日
    33
  • CSS基础知识

    CSS基础知识

    2021年10月7日
    33
  • 38款 流媒体服务器开源软件

    38款 流媒体服务器开源软件Flash流媒体服务器Red5Red5是一个采用Java开发开源的Flash流媒体服务器。它支持:把音频(MP3)和视频(FLV)转换成播放流;录制客户端播放流(只支持FLV);共享对象;现场直播流发布;远程调用。Red5使用RSTP作为流媒体传输协议,在其自带的一些示例中演示了在线录制,flash…更多Red5信息最近更新:Red51.0.1

    2022年5月2日
    43

发表回复

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

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