This commit is contained in:
2025-05-14 00:27:51 +08:00
parent e141fac69b
commit 398aad437b
10 changed files with 357 additions and 1 deletions

View File

@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<!-- 歌曲标题和作者 -->
<TextView
android:id="@+id/song_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="歌曲标题"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/song_artist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="歌曲作者"
android:textSize="16sp"
android:layout_marginBottom="16dp" />
<!-- 表格 -->
<TableLayout
android:id="@+id/song_table"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:stretchColumns="*" />
<!-- 额外信息 -->
<TextView
android:id="@+id/extra_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="额外信息"
android:layout_marginTop="16dp" />
<!-- 添加到计划按钮 -->
<com.google.android.material.button.MaterialButton
android:id="@+id/add_to_plan_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="添加到计划"
android:layout_marginTop="16dp" />
</LinearLayout>
</ScrollView>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="8dp">
<TextView
android:id="@+id/song_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Song Title"
android:textSize="16sp"
android:textStyle="bold"
android:ellipsize="end"
android:maxLines="1" />
<TextView
android:id="@+id/song_artist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Artist Name"
android:textSize="14sp"
android:ellipsize="end"
android:maxLines="1"
android:textColor="#757575" />
</LinearLayout>

View File

@@ -0,0 +1,31 @@
<!-- res/layout/item_song_search_result.xml -->
<com.google.android.material.card.MaterialCardView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:clickable="true"
android:focusable="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:id="@+id/song_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/song_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textColor="?attr/colorOnSurfaceVariant" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>

View File

@@ -0,0 +1,25 @@
<!-- res/layout/dialog_rating_project.xml -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="搜索歌曲(支持 ID, 歌曲名, 作者, 难度)">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/search_input"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</com.google.android.material.textfield.TextInputLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/song_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp" />
</LinearLayout>

View File

@@ -0,0 +1,39 @@
<!-- res/layout/dialog_song_detail.xml -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:id="@+id/song_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/song_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp" />
<TextView
android:id="@+id/song_author"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp" />
<TextView
android:id="@+id/song_genre"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp" />
<TextView
android:id="@+id/song_level"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp" />
</LinearLayout>