热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Androidstudio第1、2周作业

作业1:安装环境,截图编程界面,截图运行界面作业2:九宫格

作业1:安装环境,截图编程界面,截图运行界面

作业2:九宫格

xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools
="http://schemas.android.com/tools"
android:layout_width
="300dp"
android:layout_height
="300dp"
android:layout_margin
="50dp"
android:background
="#C23D3D"
android:orientation
="vertical">
<LinearLayout
android:id="@+id/ll_1"
android:layout_width
="match_parent"
android:layout_height
="0dp"
android:layout_weight
="1"
android:background
="#ECECEC"
android:orientation
="horizontal">
<View
android:id="@+id/v_1"
android:layout_width
="0dp"
android:layout_height
="match_parent"
android:layout_weight
="1"
android:background
="#8C192F" />
<View
android:id="@+id/v_2"
android:layout_width
="0dp"
android:layout_height
="match_parent"
android:layout_weight
="1"
android:background
="#FFFdf0" />
<View
android:id="@+id/v_3"
android:layout_width
="0dp"
android:layout_height
="match_parent"
android:layout_weight
="1"
android:background
="#115DFF" />
LinearLayout>
<LinearLayout
android:id="@+id/ll_2"
android:layout_width
="match_parent"
android:layout_height
="0dp"
android:layout_weight
="1"
android:background
="#EB3223"
tools:ignore
="DuplicateIds">
<View
android:id="@+id/v_4"
android:layout_width
="0dp"
android:layout_height
="match_parent"
android:layout_weight
="1"
android:background
="#0E5D2D" />
<View
android:id="@+id/v_5"
android:layout_width
="0dp"
android:layout_height
="match_parent"
android:layout_weight
="1"
android:background
="#E91DC6" />
<View
android:id="@+id/v_6"
android:layout_width
="0dp"
android:layout_height
="match_parent"
android:layout_weight
="1"
android:background
="#EEE5CC" />
LinearLayout>
<LinearLayout
android:id="@+id/ll_3"
android:layout_width
="match_parent"
android:layout_height
="0dp"
android:layout_weight
="1"
android:background
="#C206EE"
tools:ignore
="DuplicateIds">
<View
android:id="@+id/v_7"
android:layout_width
="0dp"
android:layout_height
="match_parent"
android:layout_weight
="1"
android:background
="#0AF00A" />
<View
android:id="@+id/v_8"
android:layout_width
="0dp"
android:layout_height
="match_parent"
android:layout_weight
="1"
android:background
="#FFFF00" />
<View
android:id="@+id/v_9"
android:layout_width
="0dp"
android:layout_height
="match_parent"
android:layout_weight
="1"
android:background
="#115DFC" />
LinearLayout>
LinearLayout>

 

 

作业3:布局界面(QQ群截图)

xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id
="@+id/v_1"
android:layout_width
="match_parent"
android:layout_height
="match_parent">
<TextView
android:id="@+id/v_2"
android:layout_width
="match_parent"
android:layout_height
="90dp"
android:background
="#002AFF">TextView>
<RelativeLayout
android:id="@+id/v_3"
android:layout_width
="match_parent"
android:layout_height
="560dp"
android:layout_below
="@id/v_2"
android:background
="#FFFFFF">
<RelativeLayout
android:id="@+id/v_5"
android:layout_width
="100dp"
android:layout_height
="match_parent"
android:background
="#D7DF01">RelativeLayout>
<RelativeLayout
android:id="@+id/v_6"
android:layout_width
="80dp"
android:layout_height
="match_parent"
android:layout_alignParentRight
="true"
android:background
="#FFC0CB">
RelativeLayout>
RelativeLayout>
<RelativeLayout
android:id="@+id/v_4"
android:layout_width
="match_parent"
android:layout_height
="90dp"
android:layout_alignBottom
="@id/v_3"
android:background
="#EE82EE">RelativeLayout>
RelativeLayout>

 

 

xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width
="match_parent"
android:layout_height
="match_parent"
android:background
="#e6e6e6">
<ImageView
android:id="@+id/T_1"
android:layout_width
="200dp"
android:layout_height
="200dp"
android:layout_centerHorizontal
="true"
android:layout_marginTop
="50dp"
android:src
="@drawable/j" />
<LinearLayout
android:id="@+id/id"
android:layout_width
="match_parent"
android:layout_height
="wrap_content"
android:layout_below
="@id/T_1"
android:layout_marginLeft
="10dp"
android:layout_marginTop
="50dp"
android:layout_marginRight
="10dp"
android:orientation
="horizontal">
<TextView
android:id="@+id/id_1"
android:layout_width
="wrap_content"
android:layout_height
="wrap_content"
android:background
="#ffffff"
android:text
="账号:"
android:textSize
="50sp" />
<EditText
android:id="@+id/id_2"
android:layout_width
="match_parent"
android:layout_height
="wrap_content"
android:background
="@null"
android:hint
="请输入账号"
android:maxLines
="1"
android:textSize
="40sp" />
LinearLayout>
<LinearLayout
android:id="@+id/pass"
android:layout_width
="match_parent"
android:layout_height
="wrap_content"
android:layout_below
="@id/id"
android:layout_marginLeft
="10dp"
android:layout_marginTop
="10dp"
android:layout_marginRight
="10dp">
<TextView
android:id="@+id/pass_1"
android:layout_width
="wrap_content"
android:layout_height
="wrap_content"
android:background
="#ffffff"
android:text
="密码:"
android:textSize
="50sp" />
<EditText
android:id="@+id/pass_2"
android:layout_width
="match_parent"
android:layout_height
="wrap_content"
android:background
="@null"
android:hint
="请输入密码"
android:maxLines
="1"
android:textSize
="40sp" />
LinearLayout>
<Button
android:layout_width="match_parent"
android:layout_height
="wrap_content"
android:layout_below
="@id/pass"
android:layout_marginLeft
="20dp"
android:layout_marginTop
="50dp"
android:layout_marginRight
="20dp"
android:background
="#FFFFFF"
android:text
="登录"
android:textSize
="40sp" />
RelativeLayout>

 

 



推荐阅读
  • Monkey《大话移动——Android与iOS应用测试指南》的预购信息发布啦!
    Monkey《大话移动——Android与iOS应用测试指南》的预购信息已经发布,可以在京东和当当网进行预购。感谢几位大牛给出的书评,并呼吁大家的支持。明天京东的链接也将发布。 ... [详细]
  • 本文介绍了lua语言中闭包的特性及其在模式匹配、日期处理、编译和模块化等方面的应用。lua中的闭包是严格遵循词法定界的第一类值,函数可以作为变量自由传递,也可以作为参数传递给其他函数。这些特性使得lua语言具有极大的灵活性,为程序开发带来了便利。 ... [详细]
  • Android中高级面试必知必会,积累总结
    本文介绍了Android中高级面试的必知必会内容,并总结了相关经验。文章指出,如今的Android市场对开发人员的要求更高,需要更专业的人才。同时,文章还给出了针对Android岗位的职责和要求,并提供了简历突出的建议。 ... [详细]
  • 本文介绍了如何使用PHP向系统日历中添加事件的方法,通过使用PHP技术可以实现自动添加事件的功能,从而实现全局通知系统和迅速记录工具的自动化。同时还提到了系统exchange自带的日历具有同步感的特点,以及使用web技术实现自动添加事件的优势。 ... [详细]
  • 本文介绍了在开发Android新闻App时,搭建本地服务器的步骤。通过使用XAMPP软件,可以一键式搭建起开发环境,包括Apache、MySQL、PHP、PERL。在本地服务器上新建数据库和表,并设置相应的属性。最后,给出了创建new表的SQL语句。这个教程适合初学者参考。 ... [详细]
  • 本文分享了一个关于在C#中使用异步代码的问题,作者在控制台中运行时代码正常工作,但在Windows窗体中却无法正常工作。作者尝试搜索局域网上的主机,但在窗体中计数器没有减少。文章提供了相关的代码和解决思路。 ... [详细]
  • 本文介绍了使用Java实现大数乘法的分治算法,包括输入数据的处理、普通大数乘法的结果和Karatsuba大数乘法的结果。通过改变long类型可以适应不同范围的大数乘法计算。 ... [详细]
  • PHP设置MySQL字符集的方法及使用mysqli_set_charset函数
    本文介绍了PHP设置MySQL字符集的方法,详细介绍了使用mysqli_set_charset函数来规定与数据库服务器进行数据传送时要使用的字符集。通过示例代码演示了如何设置默认客户端字符集。 ... [详细]
  • Java序列化对象传给PHP的方法及原理解析
    本文介绍了Java序列化对象传给PHP的方法及原理,包括Java对象传递的方式、序列化的方式、PHP中的序列化用法介绍、Java是否能反序列化PHP的数据、Java序列化的原理以及解决Java序列化中的问题。同时还解释了序列化的概念和作用,以及代码执行序列化所需要的权限。最后指出,序列化会将对象实例的所有字段都进行序列化,使得数据能够被表示为实例的序列化数据,但只有能够解释该格式的代码才能够确定数据的内容。 ... [详细]
  • HDU 2372 El Dorado(DP)的最长上升子序列长度求解方法
    本文介绍了解决HDU 2372 El Dorado问题的一种动态规划方法,通过循环k的方式求解最长上升子序列的长度。具体实现过程包括初始化dp数组、读取数列、计算最长上升子序列长度等步骤。 ... [详细]
  • 本文介绍了如何使用php限制数据库插入的条数并显示每次插入数据库之间的数据数目,以及避免重复提交的方法。同时还介绍了如何限制某一个数据库用户的并发连接数,以及设置数据库的连接数和连接超时时间的方法。最后提供了一些关于浏览器在线用户数和数据库连接数量比例的参考值。 ... [详细]
  • Metasploit攻击渗透实践
    本文介绍了Metasploit攻击渗透实践的内容和要求,包括主动攻击、针对浏览器和客户端的攻击,以及成功应用辅助模块的实践过程。其中涉及使用Hydra在不知道密码的情况下攻击metsploit2靶机获取密码,以及攻击浏览器中的tomcat服务的具体步骤。同时还讲解了爆破密码的方法和设置攻击目标主机的相关参数。 ... [详细]
  • 本文介绍了C#中数据集DataSet对象的使用及相关方法详解,包括DataSet对象的概述、与数据关系对象的互联、Rows集合和Columns集合的组成,以及DataSet对象常用的方法之一——Merge方法的使用。通过本文的阅读,读者可以了解到DataSet对象在C#中的重要性和使用方法。 ... [详细]
  • 本文介绍了使用kotlin实现动画效果的方法,包括上下移动、放大缩小、旋转等功能。通过代码示例演示了如何使用ObjectAnimator和AnimatorSet来实现动画效果,并提供了实现抖动效果的代码。同时还介绍了如何使用translationY和translationX来实现上下和左右移动的效果。最后还提供了一个anim_small.xml文件的代码示例,可以用来实现放大缩小的效果。 ... [详细]
  • 开发笔记:加密&json&StringIO模块&BytesIO模块
    篇首语:本文由编程笔记#小编为大家整理,主要介绍了加密&json&StringIO模块&BytesIO模块相关的知识,希望对你有一定的参考价值。一、加密加密 ... [详细]
author-avatar
_ZY寶貝_
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有