2024.5.30
第六十天
所花时间:2小时
代码量:400+
博客量:1
了解到的知识点:个人资料界面交互代码
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <!-- 用户名 --> <TextView android:id="@+id/text_username" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="用户名" android:textSize="20sp" android:layout_marginTop="20dp" android:layout_centerHorizontal="true"/> <!-- 编辑资料按钮 --> <androidx.appcompat.widget.AppCompatButton android:id="@+id/btn_edit_profile" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="编辑资料" android:layout_below="@id/text_username" android:layout_marginTop="20dp"/> <!-- 修改密码按钮 --> <androidx.appcompat.widget.AppCompatButton android:id="@+id/btn_change_password" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="修改密码" android:layout_below="@id/btn_edit_profile" android:layout_marginTop="10dp"/> <!-- 设置按钮 --> <androidx.appcompat.widget.AppCompatButton android:id="@+id/btn_settings" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="设置" android:layout_below="@id/btn_change_password" android:layout_marginTop="10dp"/> <!-- 关于我们按钮 --> <androidx.appcompat.widget.AppCompatButton android:id="@+id/btn_about_us" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="关于我们" android:layout_below="@id/btn_settings" android:layout_marginTop="10dp"/> </RelativeLayout>