三月十三日
今天发现自己的Android studio新建的app有问题,因为新版的有改动,所以一直没有发现。今天还好请教同学才发现,不然不知道要吃多少亏。
暂时是了解到activity_mian.xml中的配置,TextView设置,基础的app页面设计。
<?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/main" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <LinearLayout android:id="@+id/linearLayout" android:layout_width="0dp" android:layout_height="0dp" android:orientation="vertical" android:padding="60dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="1.0" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_bias="1.0"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" tools:ignore="MissingConstraints"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:text="老师:" android:textSize="20dp" /> <EditText android:id="@+id/name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="2" android:hint="赶紧输入" android:textSize="20dp" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" tools:ignore="MissingConstraints"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:text="上课地点:" android:textSize="20dp" /> <EditText android:id="@+id/psw" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="2" android:hint="赶快输入" android:textSize="20dp" /> </LinearLayout> <Button android:id="@+id/add" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="40dp" android:text="添加" android:textSize="20dp" android:onClick="onButtonClick" /> /> <Button android:id="@+id/del" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="40dp" android:text="删除" android:textSize="20dp" /> <Button android:id="@+id/change" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="40dp" android:text="修改" android:textSize="20dp" /> <Button android:id="@+id/seeAll" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="40dp" android:text="全部查询" android:textSize="20dp" /> <ScrollView android:layout_width="match_parent" android:layout_height="150dp" android:layout_marginTop="40dp"> <TextView android:id="@+id/content" android:layout_width="match_parent" android:layout_height="wrap_content" /> </ScrollView> </LinearLayout> </androidx.constraintlayout.widget.ConstraintLayout>
还有今天配了一个新的眼镜,打算去学车了。