This commit is contained in:
2025-04-08 23:05:25 +08:00
parent a71d53e8c4
commit 149e156e24
41 changed files with 2647 additions and 3 deletions

View File

@@ -0,0 +1,15 @@
<!-- res/anim/dialog_enter.xml -->
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha
android:fromAlpha="0.0"
android:toAlpha="1.0"
android:duration="300" />
<scale
android:fromXScale="0.9"
android:toXScale="1.0"
android:fromYScale="0.9"
android:toYScale="1.0"
android:pivotX="50%"
android:pivotY="50%"
android:duration="300" />
</set>

View File

@@ -0,0 +1,15 @@
<!-- res/anim/dialog_exit.xml -->
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha
android:fromAlpha="1.0"
android:toAlpha="0.0"
android:duration="300" />
<scale
android:fromXScale="1.0"
android:toXScale="0.9"
android:fromYScale="1.0"
android:toYScale="0.9"
android:pivotX="50%"
android:pivotY="50%"
android:duration="300" />
</set>

View File

@@ -0,0 +1,17 @@
<!-- res/drawable/custom_searchview_background.xml -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<solid android:color="@android:color/transparent" />
<stroke
android:width="1dp"
android:color="?attr/colorPrimary" />
<corners android:radius="8dp" />
<padding
android:left="8dp"
android:top="8dp"
android:right="8dp"
android:bottom="8dp" />
</shape>
</item>
</selector>

View File

@@ -0,0 +1,58 @@
<?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:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.pixiv.PixivFragment">
<!-- Path 1 -->
<LinearLayout
android:id="@+id/path1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<!-- 搜索框 -->
<androidx.appcompat.widget.SearchView
android:id="@+id/searchView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:queryHint="搜索..."
android:layout_margin="16dp"
style="@style/CustomSearchView" />
<!-- TextView -->
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="FindPixiv"
android:textSize="18sp"
android:layout_marginTop="8dp" />
</LinearLayout>
<!-- Path 2 -->
<LinearLayout
android:id="@+id/path2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorOnPrimary"
android:scrollbars="vertical" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<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"
app:cardCornerRadius="8dp"
app:cardElevation="4dp"
android:clickable="true"
android:focusable="true"
android:layout_margin="8dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/backgroundLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:alpha="0.5" /> <!-- 设置透明度为50% -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="18sp"
android:textStyle="bold"
android:maxLines="1"
android:ellipsize="end" />
</LinearLayout>
</RelativeLayout>
</androidx.cardview.widget.CardView>

View File

@@ -0,0 +1,53 @@
<?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:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp">
<TextView
android:id="@+id/user"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="loading"
android:textSize="18sp"
android:paddingBottom="8dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<TextView
android:id="@+id/des"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="loading"
android:textSize="16sp"
android:paddingBottom="16dp"
app:layout_constraintTop_toBottomOf="@id/user"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<com.google.android.material.button.MaterialButton
android:id="@+id/share"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="下载图集(打包)"
app:layout_constraintTop_toBottomOf="@id/des"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintVertical_bias="0.5" />
<ScrollView
android:id="@+id/scrollView"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintTop_toBottomOf="@id/share"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent">
<LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/li"
android:orientation="vertical"/>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -13,6 +13,9 @@
<item
android:id="@+id/nav_music"
android:title="@string/menu_music"/>
<item
android:id="@+id/nav_pixiv"
android:title="@string/menu_pixiv"/>
<item
android:id="@+id/nav_slideshow"
android:title="@string/menu_slideshow"/>

View File

@@ -20,7 +20,12 @@
android:id="@+id/nav_music"
android:name="org.astral.findmaimaiultra.ui.music.MusicFragment"
android:label="@string/menu_music"
tools:layout="@layout/fragment_gallery"/>
tools:layout="@layout/fragment_music"/>
<fragment
android:id="@+id/nav_pixiv"
android:name="org.astral.findmaimaiultra.ui.pixiv.PixivFragment"
android:label="@string/menu_pixiv"
tools:layout="@layout/fragment_pixiv"/>
<fragment
android:id="@+id/nav_slideshow"
android:name="org.astral.findmaimaiultra.ui.slideshow.SlideshowFragment"

View File

@@ -39,6 +39,7 @@
<string name="nav_header_title">FindMaimaiDX</string>
<string name="nav_header_subtitle">Reisa</string>
<string name="action_settings">设置</string>
<string name="menu_pixiv">pixiv</string>
</resources>

View File

@@ -12,5 +12,10 @@
<item name="cornerFamily">rounded</item>
<item name="cornerSize">16dp</item>
</style>
<style name="CustomSearchView" parent="Widget.AppCompat.SearchView">
<item name="queryBackground">@drawable/custom_searchview_background</item>
</style>
<style name="DialogAnimation"> <item name="android:windowEnterAnimation">@anim/dialog_enter</item>
<item name="android:windowExitAnimation">@anim/dialog_exit</item>
</style>
</resources>