插入图片
<ImageView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="@mipmap/qq"/>插入可编辑文本框
<EditText
android:inputType="number"
android:hint="请输入QQ号码"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />插入文本框
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="New Text"
android:id="@+id/textView" />插入按钮
<Button
android:onClick="login"
android:text="登录"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
Android Studio一些控件的使用
最新推荐文章于 2023-06-07 10:50:28 发布
本文介绍了Android Studio中如何插入图片、可编辑文本框、文本框和按钮,并详细讲解了如何使控件居中,包括通过gravity和layout_gravity属性。还涵盖了线性布局的垂直和水平排列,以及相对布局的使用,特别是ListView在展示列表内容的应用。
摘要由CSDN通过智能技术生成