每日总结3.17(附结对4)
每日总结:
所花时间:10h
代码量:300行
博客量:1篇
————————————~~~~~~刷~~~~~————————————————
首先是今天满课,然后昨天因为学习安卓过于认真忘了写博客,所以今天带上昨天的内容一并加上,直接上代码
<?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); } }); } }
————————————~~~~~~刷~~~~~————————————————
同理,压根没有管结对作业
————————————~~~~~~刷~~~~~————————————————
每日一图!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通