首页 > 其他分享 >6.1

6.1

时间:2024-06-16 17:14:19浏览次数:5  
标签:layout height content 6.1 wrap android id

今日总结

今日适合敲代码

学习时间好久

请看代码

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">


<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:layout_editor_absoluteX="219dp"
tools:layout_editor_absoluteY="207dp"
android:background="@drawable/becautiful01"
android:padding="50dp"

>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">


<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textSize="15sp"
android:text="账号:" />

<EditText
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ems="10"
android:inputType="textPersonName"
android:text="" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">


<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textSize="15sp"
android:text="密码:"

/>

<EditText
android:id="@+id/password"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ems="10"
android:inputType="textPersonName"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">



</LinearLayout>


<Button
android:layout_marginTop="50dp"
android:id="@+id/loginButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="登录"
android:onClick="login"
/>

<Button
android:id="@+id/button3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="reg"
android:text="注册" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>



<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="5dp">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="下面的按钮英文字母默认大写"
android:textColor="@color/black"
android:textSize="17dp" />

<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/HelloWorld"
android:textColor="@color/black"
android:textSize="17dp"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="下面的按钮英文字母默认大写"
android:textColor="@color/black"
android:textSize="17dp" />

<Button
android:id="@+id/timebutton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="直接指定点击方法"
android:textColor="@color/black"
android:textSize="17dp"
android:onClick="doClick"/>

<TextView
android:id="@+id/tv_result"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="这里查看按钮的点击结果"
android:textColor="@color/black"
android:textSize="17dp" />


</LinearLayout>

标签:layout,height,content,6.1,wrap,android,id
From: https://www.cnblogs.com/tianpeisen/p/18250889

相关文章

  • 2024.6.16
    2024.6.16【执笔洇墨铸流年,仗剑酌酒碎绮梦】Sunday五月十一父亲节模拟赛A.正确答案【题目描述】小H与小Y刚刚参加完UOIP外卡组的初赛,就迫不及待的跑出考场对答案。“吔,我的答案和你都不一样!”,小Y说道,”我们去找神犇们问答案吧”。外卡组试卷中共有m道判断题,小H与小Y......
  • 6.14实验四:共轭梯度法程序设计
    实验四:共轭梯度法程序设计一、实验目的掌握共轭梯度法的基本思想及其迭代步骤;学会运用MATLAB编程实现常用优化算法;能够正确处理实验数据和分析实验结果及调试程序。  二、实验内容(1)求解无约束优化问题:(2)终止准则取;(3)完成FR共轭梯度法的MATLAB编程、调试;(4)选取几个与实验二......
  • 6.13安卓开发日记57
    今天完成工程数学作业实验五实验五:MATLAB最优化工具箱的使用一、实验目的通过一个农业生产计划优化安排的实例求解,培养学生解决实际线性规划问题的初步能力;熟悉线性规划的建模过程;掌握Matlab优化工具箱中线性规划函数的调用。通过一个投资组合优化问题的实例求解,培养学生解决......
  • 6.12安卓开发日记56
    再次深入《构建之法》,我仿佛踏上了一场对软件工程领域深度探索与自我反思的旅程。这本书不仅是一份实践指南,更像是一位智者,在我耳边低语,引导我理解软件开发的本质,以及如何在这个充满挑战与机遇的行业中稳健前行。以下是我在这次重读过程中获得的新见解和深化的感悟。###1.**软......
  • 6.14安卓开发日记58
     实验三:Newton法程序设计一、实验目的掌握Hesse矩阵的计算方法和Newton法的基本思想及其迭代步骤;学会运用MATLAB编程实现常用优化算法;能够正确处理实验数据和分析实验结果及调试程序。二、实验内容(1)求解无约束优化问题:;(2)终止准则取;(3)完成Newton法(牛顿法)的MATLAB编程、调试......
  • 【2024.06.15】35mm定焦构图练习
    图源都为午饭饭,可以在B站搜索到,侵删50期日光充足、裙、小清新、城镇、伞......
  • 6.15 七桥问题,欧拉回路
    欧拉回路就是,用一条线,走过所有的路,而且不重复,这种问题使用了并查集并查集分为两个部分:查找:1.初始化,将每个节点都初始化成一颗树find():根据给的边,找到他们的根节点,并更新union():把根节点不一样的连成一颗树,实现几棵树变成一棵树并查集的作用:在于判断所有的节点是不是属于同一个......
  • 闲话 24.6.15
    闲话待补。也可能不补(最近听了好多v曲啊(感叹今日推歌:乌云雨透明的我by沉林川etal.feat.星尘:去时枝by沉林川feat.洛天依I.I.IGROKbyJUSF周存feat.洛天依一个奇怪的渐近估计之前在思考[数据删除]的做法时,想出了一个完全错误的方法。在计算复杂度......
  • 6.14-二叉树遍历
    题目分类题目分类大纲如下:二叉树的种类在我们解题过程中二叉树有两种主要的形式:满二叉树和完全二叉树。满二叉树满二叉树:如果一棵二叉树只有度为0的结点和度为2的结点,并且度为0的结点在同一层上,则这棵二叉树为满二叉树。如图所示:这棵二叉树为满二叉树,也可以说深度为k,有......
  • 6.14 哈希表
    采用邻接表创建无向图G,依次输出各顶点的度。输入格式:输入第一行中给出2个整数i(0<i≤10),j(j≥0),分别为图G的顶点数和边数。输入第二行为顶点的信息,每个顶点只能用一个字符表示。依次输入j行,每行输入一条边依附的顶点。输出格式:依次输出各顶点的度,行末没有最后的空格。输入......