首页 > 其他分享 >3.23总结

3.23总结

时间:2023-03-23 20:35:16浏览次数:42  
标签:总结 layout parent height 3.23 android id match

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="20dp"
android:background="#00AAFF"
android:gravity="center"
android:orientation="vertical"
android:padding="60dp">

<TextView
android:id="@+id/tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="你好世界" />

<Button
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="登录"
android:textSize="30dp" />

<Button
android:id="@+id/button1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="可爱的可莉"
android:textSize="30dp" />


</LinearLayout>

 

 

 

 

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:orientation="vertical">

<RadioGroup
android:id="@+id/rg_login"
android:layout_width="match_parent"
android:layout_height="@dimen/item_layout_height"
android:orientation="horizontal">

<RadioButton
android:id="@+id/rb_password"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:checked="true"
android:text="密码登录"
android:textColor="@color/black"
android:textSize="@dimen/common_font_size" />

<RadioButton
android:id="@+id/rb_verifycode"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="验证码登录"
android:textColor="@color/black"
android:textSize="@dimen/common_font_size" />
</RadioGroup>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/item_layout_height"
android:orientation="horizontal">

<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:text="手机号码:"
android:textColor="@color/black"
android:textSize="@dimen/common_font_size" />

<EditText
android:id="@+id/et_phone"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:layout_weight="1"
android:background="@drawable/editext_selector"
android:hint="请输入手机号码"
android:inputType="number"
android:maxLength="11"
android:textColor="@color/black"
android:textColorHint="@color/grey"
android:textSize="@dimen/common_font_size" />

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/item_layout_height"
android:orientation="horizontal">

<TextView
android:id="@+id/tv_password"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:text="登陆密码:"
android:textColor="@color/black"
android:textSize="@dimen/common_font_size" />

<RelativeLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">

<EditText
android:id="@+id/et_password"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:layout_weight="1"
android:background="@drawable/editext_selector"
android:hint="请输入密码"
android:inputType="numberPassword"
android:textColor="@color/black"
android:textColorHint="@color/grey"
android:textSize="@dimen/common_font_size" />

<Button
android:id="@+id/btn_forget"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentEnd="true"
android:text="忘记密码"
android:textColor="@color/white"
android:textSize="@dimen/common_font_size" />

</RelativeLayout>

</LinearLayout>

<CheckBox
android:id="@+id/ck_remember"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="记住密码"
android:textColor="@color/black"
android:textSize="@dimen/common_font_size"
/>

<Button
android:id="@+id/btn_login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="登录"
android:textColor="@color/white"
android:textSize="@dimen/button_font_size"
/>
</LinearLayout>

 

 

 

 

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="0dp"
android:background="#00AAFF"
android:gravity="center"
android:orientation="vertical"
android:padding="20dp">


<Button
android:id="@+id/btn_date"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="选择日期" />

<TextView
android:id="@+id/tv_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/editext_selector"
android:hint="打卡日期"
android:inputType="text" />

<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/editext_selector"
android:hint="关键字"
android:inputType="text" />

<EditText
android:layout_width="match_parent"
android:layout_height="120dp"
android:background="@drawable/editext_selector"
android:gravity="clip_horizontal"
android:hint="每日总结"
android:inputType="text" />


</LinearLayout>

 

 

 

 

package com.example.myapplication;

import static android.view.View.*;
import static com.example.myapplication.R.*;


import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.example.myapplication.R.id;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(layout.activity_main);
TextView tv = findViewById(id.tv);
tv.setTextSize(30);
tv.setTextColor(Color.MAGENTA);
tv.setText("你好,希儿");

Button button = findViewById(id.button);
Button button1 = findViewById(id.button1);
button.setTextColor(0xff00ff00);
button.setBackgroundColor(Color.YELLOW);
button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent();
intent.setClass(MainActivity.this, MainActivity2.class);
startActivity(intent);
}
});
button1.setTextColor(0xff00ff00);
button1.setBackgroundColor(Color.GREEN);
button1.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v1) {
Intent intent = new Intent();
intent.setClass(MainActivity.this, Mainphoto1.class);
startActivity(intent);
}
});


}
}

标签:总结,layout,parent,height,3.23,android,id,match
From: https://www.cnblogs.com/XiMenXve/p/17249295.html

相关文章

  • 每日双人总结
    CREATETABLEbj_subway(station_idINTNOTNULLPRIMARYKEY,line_nameVARCHAR(20)NOTNULL,station_nameVARCHAR(50)NOTNULL,next_stationVARCHAR(......
  • 3.23每日总结
    <%@pagelanguage="java"contentType="text/html;charset=UTF-8"pageEncoding="UTF-8"%><!DOCTYPEhtml><htmlxmlns="http://www.w3.org/1999/html">......
  • 【Java】关于Queue的用法总结
    【Java】关于Queue的用法总结原文链接:https://blog.csdn.net/qq_25353433/article/details/88016369之前对Queue只有一知半解,常用它的某几个方法,却不知道其中的区别,看了......
  • 今日总结
    今天把android端的北京地铁查询系统给完成了,主要功能实现了。学习时长:3小时,代码:360行,其中遇到了不少问题,在子线程设置settext会报错,再重写相同方法就可以了。toast也会报错......
  • 闲话 23.3.23
    闲话武汉一程又诞生了许多梗(比方说常求暴政cgy和午饭点哪家外卖昨天没写闲话是因为返校了懒得写!打了几个新买的游戏发现没通关就没兴趣了(这就是我的末路吗(当然大......
  • spring ldap 使用总结
    1.报错1.1 org.springframework.ldap.PartialResultException:UnprocessedContinuationReference(s);nestedexceptionisjavax.naming.PartialResultException:......
  • 2023.3.23蓝桥杯集训·每日一题
    今日复习的内容是背包问题。记得动态规划问题的初始化。AcWing3382.整数划分解题思路考虑到本题是将一个数划分为\(2\)的幂的和,而\(2\)的\(i\)幂是可以无限使用......
  • 3.22学习总结
    1.MVC模式的简单理解在开始学习Adapter之前我们要来了解下这个MVC模式概念:举个例子:大型的商业程序通常由多人一同开发完成,比如有人负责操作接口的规划与设计,有人负责......
  • 第六周星期三每日总结
      今日完成地铁查询系统android端线路查询功能的开发,站点查询可参考此查询方式。但是此查询方式仍有不足,比如会遇到查询信息过长界面不能完全显示导致的软件闪退,期望再......
  • 2023.3.22三天学习总结
    一.三天任务1.费用流的学习和练习2.dp练习3.cf补题和abc补题4.补了一些以前题目的题解二.补题情况   三.题解(174条消息)图论习......