今天是冲刺的第一天,我完成的团队任务卡的分配以及完成了android端的界面设计可以满足额外模块的添加代码详情如下!



activity_main.xml中
<androidx.drawerlayout.widget.DrawerLayout 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/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity">

<com.google.android.material.appbar.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<androidx.appcompat.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" app:title="模块管理系统"/>
</com.google.android.material.appbar.AppBarLayout>
<androidx.recyclerview.widget.RecyclerView android:id="@+id/module_recycler_view" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="8dp"/>
<com.google.android.material.floatingactionbutton.FloatingActionButton android:id="@+id/fab_add_module" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|end" android:layout_margin="16dp" android:src="@android:drawable/ic_input_add"/>

<com.google.android.material.navigation.NavigationView android:id="@+id/nav_view" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="start" app:headerLayout="@layout/nav_header_main" app:menu="@menu/activity_main_drawer"/>
</androidx.drawerlayout.widget.DrawerLayout>

item_module.xml
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="8dp" app:cardCornerRadius="8dp" app:cardElevation="4dp">








</androidx.cardview.widget.CardView>
item_module_header.xml

遇到的问题,在刚创建项目的时候一直出现Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradle-8.11.1-bin.zip'. Reason: java.net.SocketTimeoutException: Connect timed out在我寻找问题的过程中发现我下载的gradle文件的版本为8.11,而实际使用的版本为8.11.1,错误导致无法找到文件地址,最终在重新下载gradle后可以重新运行