摘要: 五、常用控件1.通用属性android:id="@+id/add_data"android:layout_width="match_parent"//与父类一样android:layout_height="wrap_content"//与控件一样android:layout_gravity //指定 阅读全文
posted @ 2021-02-20 22:16 步履向前 阅读(429) 评论(0) 推荐(0)
摘要: Intent的使用(1)——用于启动活动1.显式Intent Intent intent = new Intent(A,B); startActivity(intent);注:Intent后有两个值,A是上下文(原页面),B是想要启动的活动。 2.隐式Intent(1)在AndroidManifes 阅读全文
posted @ 2021-02-20 22:13 步履向前 阅读(216) 评论(0) 推荐(0)
摘要: 二、Toast的使用1.格式:Toast.makeText(A,B,C).show();2. 三个参数:A -上下文(可用 MainActivity.this ) B - 显示的文本内容 (自定义) C - 显示的时长 (Toast.LENGTH_SHORT 或 Toast.LENGTH_LONG) 阅读全文
posted @ 2021-02-20 22:11 步履向前 阅读(96) 评论(0) 推荐(0)