摘要: private Button btn; btn.findViewById(R.id.btn_submit); 当寻找的资源不是主页面的时候,很有可能出现错误。 上一章的实验就出现了差错:https://www.cnblogs.com/Master-Sun/p/14260238.html 在于, bt 阅读全文
posted @ 2021-01-10 23:56 Master_Sun 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 过程中出了点小问题,详情见:https://www.cnblogs.com/Master-Sun/p/14260259.html activity_reg.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android=" 阅读全文
posted @ 2021-01-10 23:48 Master_Sun 阅读(91) 评论(0) 推荐(0) 编辑
摘要: package com.androidstudy.uicomponenttest; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import android.content 阅读全文
posted @ 2021-01-10 20:57 Master_Sun 阅读(76) 评论(0) 推荐(0) 编辑
摘要: 对话框AlertDialog 一、普通对话框 <Button android:id="@+id/btn_main_normaldialog" android:text="启动常规对话框" android:onClick="startNormalDialog1" android:layout_widt 阅读全文
posted @ 2021-01-10 16:30 Master_Sun 阅读(104) 评论(0) 推荐(0) 编辑
摘要: ProgressBar组件 一、圆形进度条 <ProgressBar android:id="@+id/progressbar1" android:layout_width="match_parent" android:layout_height="wrap_content"/> <TextView 阅读全文
posted @ 2021-01-10 15:50 Master_Sun 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 来源:https://www.cnblogs.com/xqz0618/p/gravity.html 讲的很详细 (一)gravity是设置自身内部元素的对齐方式。比如一个TextView,则是设置内部文字的对齐方式。如果是ViewGroup组件如LinearLayout的话,则为设置它内部view组 阅读全文
posted @ 2021-01-10 15:09 Master_Sun 阅读(166) 评论(0) 推荐(0) 编辑