feat: 重新设计幻灯片播放界面
- 添加顶部栏和渐变遮罩,提升视觉层次 - 重新设计控制面板为毛玻璃浮岛效果 - 添加自定义图标(播放、暂停、上一张、下一张、缩放模式) - 优化幻灯片选择页面布局为网格样式 - 改进相册信息卡片设计 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4f7eb94047
commit
4a3fb57cb8
10 files changed
+390
-190
No files matched your search
@@ -35,6 +35,7 @@ public class SlideshowPlayerActivity extends AppCompatActivity {
|
|||||||
private ImageView ivSlideshow;
|
private ImageView ivSlideshow;
|
||||||
private ImageView ivSlideshowBack;
|
private ImageView ivSlideshowBack;
|
||||||
private View controlPanel;
|
private View controlPanel;
|
||||||
|
private View topBar;
|
||||||
private TextView tvProgress;
|
private TextView tvProgress;
|
||||||
private SeekBar seekBarInterval;
|
private SeekBar seekBarInterval;
|
||||||
private TextView tvIntervalLabel;
|
private TextView tvIntervalLabel;
|
||||||
@@ -117,6 +118,7 @@ public class SlideshowPlayerActivity extends AppCompatActivity {
|
|||||||
ivSlideshow = findViewById(R.id.ivSlideshow);
|
ivSlideshow = findViewById(R.id.ivSlideshow);
|
||||||
ivSlideshowBack = findViewById(R.id.ivSlideshowBack);
|
ivSlideshowBack = findViewById(R.id.ivSlideshowBack);
|
||||||
controlPanel = findViewById(R.id.controlPanel);
|
controlPanel = findViewById(R.id.controlPanel);
|
||||||
|
topBar = findViewById(R.id.topBar);
|
||||||
tvProgress = findViewById(R.id.tvProgress);
|
tvProgress = findViewById(R.id.tvProgress);
|
||||||
seekBarInterval = findViewById(R.id.seekBarInterval);
|
seekBarInterval = findViewById(R.id.seekBarInterval);
|
||||||
tvIntervalLabel = findViewById(R.id.tvIntervalLabel);
|
tvIntervalLabel = findViewById(R.id.tvIntervalLabel);
|
||||||
@@ -308,7 +310,7 @@ public class SlideshowPlayerActivity extends AppCompatActivity {
|
|||||||
private void pause() {
|
private void pause() {
|
||||||
isPlaying = false;
|
isPlaying = false;
|
||||||
stopAutoPlay();
|
stopAutoPlay();
|
||||||
btnPlayPause.setIcon(getDrawable(android.R.drawable.ic_media_play));
|
btnPlayPause.setIcon(getDrawable(R.drawable.ic_play));
|
||||||
// 暂停时不隐藏控制面板
|
// 暂停时不隐藏控制面板
|
||||||
hideHandler.removeCallbacks(hideRunnable);
|
hideHandler.removeCallbacks(hideRunnable);
|
||||||
}
|
}
|
||||||
@@ -316,7 +318,7 @@ public class SlideshowPlayerActivity extends AppCompatActivity {
|
|||||||
private void resume() {
|
private void resume() {
|
||||||
isPlaying = true;
|
isPlaying = true;
|
||||||
startAutoPlay();
|
startAutoPlay();
|
||||||
btnPlayPause.setIcon(getDrawable(android.R.drawable.ic_media_pause));
|
btnPlayPause.setIcon(getDrawable(R.drawable.ic_pause));
|
||||||
resetHideTimer();
|
resetHideTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -348,10 +350,10 @@ public class SlideshowPlayerActivity extends AppCompatActivity {
|
|||||||
// 使用不同图标表示当前模式
|
// 使用不同图标表示当前模式
|
||||||
if (isFullScreen) {
|
if (isFullScreen) {
|
||||||
// 当前是填充模式,点击切换到适应模式
|
// 当前是填充模式,点击切换到适应模式
|
||||||
btnScaleMode.setIcon(getDrawable(android.R.drawable.ic_menu_crop));
|
btnScaleMode.setIcon(getDrawable(R.drawable.ic_fit_screen));
|
||||||
} else {
|
} else {
|
||||||
// 当前是适应模式,点击切换到填充模式
|
// 当前是适应模式,点击切换到填充模式
|
||||||
btnScaleMode.setIcon(getDrawable(android.R.drawable.ic_menu_view));
|
btnScaleMode.setIcon(getDrawable(R.drawable.ic_fullscreen));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -373,6 +375,15 @@ public class SlideshowPlayerActivity extends AppCompatActivity {
|
|||||||
.setDuration(300)
|
.setDuration(300)
|
||||||
.start();
|
.start();
|
||||||
|
|
||||||
|
topBar.setVisibility(View.VISIBLE);
|
||||||
|
topBar.setAlpha(0f);
|
||||||
|
topBar.setTranslationY(-100f);
|
||||||
|
topBar.animate()
|
||||||
|
.alpha(1f)
|
||||||
|
.translationY(0f)
|
||||||
|
.setDuration(300)
|
||||||
|
.start();
|
||||||
|
|
||||||
if (isPlaying) {
|
if (isPlaying) {
|
||||||
resetHideTimer();
|
resetHideTimer();
|
||||||
}
|
}
|
||||||
@@ -385,6 +396,13 @@ public class SlideshowPlayerActivity extends AppCompatActivity {
|
|||||||
.setDuration(300)
|
.setDuration(300)
|
||||||
.withEndAction(() -> controlPanel.setVisibility(View.GONE))
|
.withEndAction(() -> controlPanel.setVisibility(View.GONE))
|
||||||
.start();
|
.start();
|
||||||
|
|
||||||
|
topBar.animate()
|
||||||
|
.alpha(0f)
|
||||||
|
.translationY(-100f)
|
||||||
|
.setDuration(300)
|
||||||
|
.withEndAction(() -> topBar.setVisibility(View.GONE))
|
||||||
|
.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void resetHideTimer() {
|
private void resetHideTimer() {
|
||||||
@@ -408,7 +426,7 @@ public class SlideshowPlayerActivity extends AppCompatActivity {
|
|||||||
loadImage(currentIndex, false);
|
loadImage(currentIndex, false);
|
||||||
endScreen.setVisibility(View.GONE);
|
endScreen.setVisibility(View.GONE);
|
||||||
isPlaying = true;
|
isPlaying = true;
|
||||||
btnPlayPause.setIcon(getDrawable(android.R.drawable.ic_media_pause));
|
btnPlayPause.setIcon(getDrawable(R.drawable.ic_pause));
|
||||||
startAutoPlay();
|
startAutoPlay();
|
||||||
resetHideTimer();
|
resetHideTimer();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<gradient
|
||||||
|
android:angle="90"
|
||||||
|
android:startColor="#80000000"
|
||||||
|
android:endColor="#00000000"
|
||||||
|
android:type="linear" />
|
||||||
|
</shape>
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<gradient
|
||||||
|
android:angle="270"
|
||||||
|
android:startColor="#80000000"
|
||||||
|
android:endColor="#00000000"
|
||||||
|
android:type="linear" />
|
||||||
|
</shape>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:tint="?attr/colorControlNormal">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M5,16h3v3h2v-5H5v2zm3,-8H5v2h5V5H8v3zm6,11h2v-3h3v-2h-5v5zm2,-11V5h-2v5h5V8h-3z"/>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:tint="?attr/colorControlNormal">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M7,14H5v5h5v-2H7v-3zm-2,-4h2V7h3V5H5v5zm12,7h-3v2h5v-5h-2v3zM14,5v2h3v3h2V5h-5z"/>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:tint="?attr/colorControlNormal">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M6,19h4V5H6v14zm8,-14v14h4V5h-4z"/>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:tint="?attr/colorControlNormal">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M6,18l8.5,-6L6,6v12zM16,6v12h2V6h-2z"/>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:tint="?attr/colorControlNormal">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M6,6h2v12H6V6zm3.5,6l8.5,6V6l-8.5,6z"/>
|
||||||
|
</vector>
|
||||||
@@ -1,171 +1,204 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@android:color/black">
|
android:background="@android:color/black">
|
||||||
|
|
||||||
<!-- 双 ImageView 用于淡入淡出切换 -->
|
<!-- Images -->
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/ivSlideshowBack"
|
android:id="@+id/ivSlideshowBack"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:contentDescription="幻灯片图片背景" />
|
android:contentDescription="Background Image" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/ivSlideshow"
|
android:id="@+id/ivSlideshow"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:contentDescription="幻灯片图片" />
|
android:contentDescription="Main Image" />
|
||||||
|
|
||||||
<!-- 控制面板 -->
|
<!-- Top Gradient -->
|
||||||
<LinearLayout
|
<View
|
||||||
android:id="@+id/controlPanel"
|
android:id="@+id/scrimTop"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="120dp"
|
||||||
android:layout_gravity="bottom"
|
android:background="@drawable/bg_gradient_scrim_top"
|
||||||
android:orientation="vertical"
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
android:background="#CC000000"
|
|
||||||
android:padding="24dp"
|
<!-- Bottom Gradient -->
|
||||||
android:visibility="visible">
|
<View
|
||||||
|
android:id="@+id/scrimBottom"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="200dp"
|
||||||
|
android:background="@drawable/bg_gradient_scrim_bottom"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent" />
|
||||||
|
|
||||||
|
<!-- Top Bar -->
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/topBar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="?attr/actionBarSize"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/btnExit"
|
||||||
|
style="@style/Widget.Material3.Button.IconButton"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
app:icon="@drawable/ic_close"
|
||||||
|
app:iconSize="24dp"
|
||||||
|
app:iconTint="@android:color/white"
|
||||||
|
app:backgroundTint="@android:color/transparent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent" />
|
||||||
|
|
||||||
<!-- 进度显示 -->
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvProgress"
|
android:id="@+id/tvProgress"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="1 / 20"
|
android:text="1 / 20"
|
||||||
android:textSize="16sp"
|
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="16sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:layout_marginBottom="16dp" />
|
android:shadowColor="#80000000"
|
||||||
|
android:shadowDx="1"
|
||||||
|
android:shadowDy="1"
|
||||||
|
android:shadowRadius="2"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent" />
|
||||||
|
|
||||||
<!-- 间隔滑块 -->
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/btnScaleMode"
|
||||||
|
style="@style/Widget.Material3.Button.IconButton"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
app:icon="@drawable/ic_fit_screen"
|
||||||
|
app:iconSize="24dp"
|
||||||
|
app:iconTint="@android:color/white"
|
||||||
|
app:backgroundTint="@android:color/transparent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<!-- Bottom Control Panel (Floating Island) -->
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/controlPanel"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="24dp"
|
||||||
|
android:layout_marginBottom="48dp"
|
||||||
|
android:padding="20dp"
|
||||||
|
android:background="@drawable/bg_glass_card"
|
||||||
|
android:elevation="8dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent">
|
||||||
|
|
||||||
|
<!-- Interval Slider -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/intervalContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:layout_marginBottom="12dp">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<TextView
|
<ImageView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="20dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="20dp"
|
||||||
android:text="间隔:"
|
android:src="@drawable/ic_schedule"
|
||||||
android:textSize="14sp"
|
app:tint="@android:color/white"
|
||||||
android:textColor="@android:color/white"
|
android:alpha="0.8"/>
|
||||||
android:layout_marginEnd="8dp" />
|
|
||||||
|
|
||||||
<SeekBar
|
<SeekBar
|
||||||
android:id="@+id/seekBarInterval"
|
android:id="@+id/seekBarInterval"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
android:layout_marginHorizontal="8dp"
|
||||||
android:max="12"
|
android:max="12"
|
||||||
android:progress="2" />
|
android:progress="2"
|
||||||
|
android:progressTint="@color/sky_blue_primary"
|
||||||
|
android:thumbTint="@color/sky_blue_primary" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvIntervalLabel"
|
android:id="@+id/tvIntervalLabel"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="48dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="5 秒"
|
android:text="5s"
|
||||||
android:textSize="14sp"
|
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:layout_marginStart="8dp"
|
android:textSize="14sp"
|
||||||
android:minWidth="48dp"
|
android:textStyle="bold"
|
||||||
android:gravity="end" />
|
android:gravity="end" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- 控制按钮 -->
|
<!-- Playback Controls -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:gravity="center"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:gravity="center">
|
app:layout_constraintTop_toBottomOf="@id/intervalContainer">
|
||||||
|
|
||||||
<!-- 上一张 -->
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/btnPrevious"
|
android:id="@+id/btnPrevious"
|
||||||
style="@style/Widget.Material3.Button.IconButton"
|
style="@style/Widget.Material3.Button.IconButton"
|
||||||
android:layout_width="48dp"
|
android:layout_width="56dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="56dp"
|
||||||
app:icon="@android:drawable/ic_media_previous"
|
app:icon="@drawable/ic_skip_previous"
|
||||||
app:iconSize="28dp"
|
app:iconSize="32dp"
|
||||||
app:iconTint="@android:color/white"
|
app:iconTint="@android:color/white"
|
||||||
app:backgroundTint="#40FFFFFF"
|
app:backgroundTint="#20FFFFFF"
|
||||||
android:layout_marginEnd="4dp" />
|
android:layout_marginEnd="16dp" />
|
||||||
|
|
||||||
<!-- 播放/暂停 -->
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/btnPlayPause"
|
android:id="@+id/btnPlayPause"
|
||||||
style="@style/Widget.Material3.Button.IconButton"
|
style="@style/Widget.Material3.Button.IconButton"
|
||||||
android:layout_width="56dp"
|
android:layout_width="72dp"
|
||||||
android:layout_height="56dp"
|
android:layout_height="72dp"
|
||||||
app:icon="@android:drawable/ic_media_pause"
|
app:icon="@drawable/ic_pause"
|
||||||
app:iconSize="32dp"
|
app:iconSize="40dp"
|
||||||
app:iconTint="@android:color/white"
|
app:iconTint="@android:color/white"
|
||||||
app:backgroundTint="#60FFFFFF"
|
app:backgroundTint="@color/sky_blue_primary"
|
||||||
android:layout_marginHorizontal="4dp" />
|
app:elevation="4dp" />
|
||||||
|
|
||||||
<!-- 下一张 -->
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/btnNext"
|
android:id="@+id/btnNext"
|
||||||
style="@style/Widget.Material3.Button.IconButton"
|
style="@style/Widget.Material3.Button.IconButton"
|
||||||
android:layout_width="48dp"
|
android:layout_width="56dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="56dp"
|
||||||
app:icon="@android:drawable/ic_media_next"
|
app:icon="@drawable/ic_skip_next"
|
||||||
app:iconSize="28dp"
|
app:iconSize="32dp"
|
||||||
app:iconTint="@android:color/white"
|
app:iconTint="@android:color/white"
|
||||||
app:backgroundTint="#40FFFFFF"
|
app:backgroundTint="#20FFFFFF"
|
||||||
android:layout_marginStart="4dp" />
|
android:layout_marginStart="16dp" />
|
||||||
|
|
||||||
<!-- 分隔 -->
|
|
||||||
<View
|
|
||||||
android:layout_width="1dp"
|
|
||||||
android:layout_height="32dp"
|
|
||||||
android:background="#40FFFFFF"
|
|
||||||
android:layout_marginHorizontal="12dp" />
|
|
||||||
|
|
||||||
<!-- 全屏/适应切换 -->
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/btnScaleMode"
|
|
||||||
style="@style/Widget.Material3.Button.IconButton"
|
|
||||||
android:layout_width="48dp"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
app:icon="@android:drawable/ic_menu_crop"
|
|
||||||
app:iconSize="24dp"
|
|
||||||
app:iconTint="@android:color/white"
|
|
||||||
app:backgroundTint="#40FFFFFF" />
|
|
||||||
|
|
||||||
<!-- 退出 -->
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/btnExit"
|
|
||||||
style="@style/Widget.Material3.Button.IconButton"
|
|
||||||
android:layout_width="48dp"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
app:icon="@android:drawable/ic_menu_close_clear_cancel"
|
|
||||||
app:iconSize="24dp"
|
|
||||||
app:iconTint="@android:color/white"
|
|
||||||
app:backgroundTint="#40FF0000"
|
|
||||||
android:layout_marginStart="4dp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<!-- 播放结束界面 -->
|
<!-- End Screen -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/endScreen"
|
android:id="@+id/endScreen"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:background="#CC000000"
|
android:background="#E6000000"
|
||||||
android:visibility="gone">
|
android:visibility="gone"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -181,7 +214,6 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<!-- 重新播放 -->
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/btnReplay"
|
android:id="@+id/btnReplay"
|
||||||
style="@style/Widget.Material3.Button.TonalButton"
|
style="@style/Widget.Material3.Button.TonalButton"
|
||||||
@@ -189,13 +221,13 @@
|
|||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
android:text="重新播放"
|
android:text="重新播放"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
|
app:icon="@drawable/ic_refresh"
|
||||||
app:backgroundTint="@color/sky_blue_primary"
|
app:backgroundTint="@color/sky_blue_primary"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
app:cornerRadius="28dp"
|
app:cornerRadius="28dp"
|
||||||
android:paddingHorizontal="32dp"
|
android:paddingHorizontal="32dp"
|
||||||
android:layout_marginEnd="16dp" />
|
android:layout_marginEnd="16dp" />
|
||||||
|
|
||||||
<!-- 退出 -->
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/btnExitEnd"
|
android:id="@+id/btnExitEnd"
|
||||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||||
@@ -205,6 +237,8 @@
|
|||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
app:strokeColor="@android:color/white"
|
app:strokeColor="@android:color/white"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
|
app:icon="@drawable/ic_close"
|
||||||
|
app:iconTint="@android:color/white"
|
||||||
app:cornerRadius="28dp"
|
app:cornerRadius="28dp"
|
||||||
android:paddingHorizontal="32dp" />
|
android:paddingHorizontal="32dp" />
|
||||||
|
|
||||||
@@ -212,4 +246,4 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</FrameLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -6,88 +6,133 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/bg_primary">
|
android:background="@color/bg_primary">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
app:elevation="0dp">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingHorizontal="@dimen/spacing_lg"
|
||||||
|
android:paddingTop="32dp"
|
||||||
|
android:paddingBottom="@dimen/spacing_md">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="幻灯片播放"
|
||||||
|
android:textSize="32sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@color/text_primary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:text="随机回顾您的美好回忆"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textColor="@color/text_secondary" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="24dp"
|
android:padding="@dimen/spacing_md"
|
||||||
android:paddingBottom="100dp"
|
android:paddingBottom="100dp">
|
||||||
android:gravity="center_horizontal">
|
|
||||||
|
|
||||||
<!-- Title -->
|
<!-- Source Info Card -->
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="幻灯片播放"
|
|
||||||
android:textSize="28sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:textColor="@color/text_primary"
|
|
||||||
android:layout_marginTop="32dp"
|
|
||||||
android:layout_marginBottom="8dp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="从当前相册随机选择图片"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:textColor="@color/text_secondary"
|
|
||||||
android:layout_marginBottom="32dp" />
|
|
||||||
|
|
||||||
<!-- Album Info Card -->
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
<com.google.android.material.card.MaterialCardView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="32dp"
|
android:layout_marginBottom="24dp"
|
||||||
app:cardCornerRadius="16dp"
|
app:cardCornerRadius="20dp"
|
||||||
app:cardElevation="2dp"
|
app:cardElevation="0dp"
|
||||||
app:strokeWidth="1dp"
|
app:strokeWidth="1dp"
|
||||||
app:strokeColor="@color/bg_secondary_modern"
|
app:strokeColor="#F0F0F0"
|
||||||
app:cardBackgroundColor="@color/white">
|
app:cardBackgroundColor="@color/white">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="horizontal"
|
||||||
android:padding="20dp">
|
android:padding="20dp"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<TextView
|
<!-- Icon -->
|
||||||
android:layout_width="wrap_content"
|
<FrameLayout
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="56dp"
|
||||||
android:text="当前相册"
|
android:layout_height="56dp"
|
||||||
android:textSize="12sp"
|
android:background="@drawable/bg_icon_container_sky"
|
||||||
android:textColor="@color/text_hint"
|
android:backgroundTint="@color/sky_blue_container">
|
||||||
android:textAllCaps="true"
|
|
||||||
android:letterSpacing="0.1"
|
|
||||||
android:layout_marginBottom="8dp" />
|
|
||||||
|
|
||||||
<TextView
|
<ImageView
|
||||||
android:id="@+id/tvAlbumName"
|
android:layout_width="28dp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="28dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_gravity="center"
|
||||||
android:text="默认相册"
|
android:src="@drawable/ic_album"
|
||||||
android:textSize="20sp"
|
app:tint="@color/sky_blue_primary" />
|
||||||
android:textStyle="bold"
|
</FrameLayout>
|
||||||
android:textColor="@color/text_primary"
|
|
||||||
android:layout_marginBottom="4dp" />
|
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:id="@+id/tvImageCount"
|
android:layout_width="0dp"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="0 张图片"
|
android:layout_weight="1"
|
||||||
android:textSize="14sp"
|
android:layout_marginStart="16dp"
|
||||||
android:textColor="@color/text_secondary" />
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="当前来源"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:textColor="@color/text_secondary"
|
||||||
|
android:letterSpacing="0.05" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvAlbumName"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="2dp"
|
||||||
|
android:text="默认相册"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@color/text_primary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvImageCount"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="2dp"
|
||||||
|
android:text="0 张图片"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textColor="@color/text_hint" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
<!-- Selection Title -->
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="选择播放数量"
|
android:text="选择播放数量"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
@@ -95,70 +140,107 @@
|
|||||||
android:textColor="@color/text_primary"
|
android:textColor="@color/text_primary"
|
||||||
android:layout_marginBottom="16dp" />
|
android:layout_marginBottom="16dp" />
|
||||||
|
|
||||||
<!-- Option Buttons -->
|
<!-- Row 1 -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="horizontal"
|
||||||
android:gravity="center">
|
android:layout_marginBottom="12dp">
|
||||||
|
|
||||||
<!-- 10 张 -->
|
<!-- 10 Photos -->
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/btn10"
|
android:id="@+id/btn10"
|
||||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="64dp"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginEnd="6dp"
|
||||||
|
android:paddingTop="24dp"
|
||||||
|
android:paddingBottom="24dp"
|
||||||
android:text="10 张"
|
android:text="10 张"
|
||||||
android:textSize="18sp"
|
android:textSize="16sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:cornerRadius="16dp"
|
android:textColor="@color/text_primary"
|
||||||
app:strokeWidth="2dp"
|
app:icon="@drawable/ic_image"
|
||||||
app:strokeColor="@color/sky_blue_primary"
|
app:iconGravity="top"
|
||||||
android:textColor="@color/sky_blue_primary"
|
app:iconSize="28dp"
|
||||||
android:layout_marginBottom="12dp" />
|
app:iconTint="@color/sky_blue_primary"
|
||||||
|
app:cornerRadius="20dp"
|
||||||
|
app:strokeColor="@color/bg_secondary_modern"
|
||||||
|
app:strokeWidth="1dp" />
|
||||||
|
|
||||||
<!-- 20 张 -->
|
<!-- 20 Photos -->
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/btn20"
|
android:id="@+id/btn20"
|
||||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="64dp"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginStart="6dp"
|
||||||
|
android:paddingTop="24dp"
|
||||||
|
android:paddingBottom="24dp"
|
||||||
android:text="20 张"
|
android:text="20 张"
|
||||||
android:textSize="18sp"
|
android:textSize="16sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:cornerRadius="16dp"
|
android:textColor="@color/text_primary"
|
||||||
app:strokeWidth="2dp"
|
app:icon="@drawable/ic_image"
|
||||||
app:strokeColor="@color/sky_blue_primary"
|
app:iconGravity="top"
|
||||||
android:textColor="@color/sky_blue_primary"
|
app:iconSize="28dp"
|
||||||
android:layout_marginBottom="12dp" />
|
app:iconTint="@color/sky_blue_primary"
|
||||||
|
app:cornerRadius="20dp"
|
||||||
|
app:strokeColor="@color/bg_secondary_modern"
|
||||||
|
app:strokeWidth="1dp" />
|
||||||
|
|
||||||
<!-- 50 张 -->
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- Row 2 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!-- 50 Photos -->
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/btn50"
|
android:id="@+id/btn50"
|
||||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="64dp"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginEnd="6dp"
|
||||||
|
android:paddingTop="24dp"
|
||||||
|
android:paddingBottom="24dp"
|
||||||
android:text="50 张"
|
android:text="50 张"
|
||||||
android:textSize="18sp"
|
android:textSize="16sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:cornerRadius="16dp"
|
android:textColor="@color/text_primary"
|
||||||
app:strokeWidth="2dp"
|
app:icon="@drawable/ic_image"
|
||||||
app:strokeColor="@color/sky_blue_primary"
|
app:iconGravity="top"
|
||||||
android:textColor="@color/sky_blue_primary"
|
app:iconSize="28dp"
|
||||||
android:layout_marginBottom="12dp" />
|
app:iconTint="@color/sky_blue_primary"
|
||||||
|
app:cornerRadius="20dp"
|
||||||
|
app:strokeColor="@color/bg_secondary_modern"
|
||||||
|
app:strokeWidth="1dp" />
|
||||||
|
|
||||||
<!-- 全部 -->
|
<!-- All Photos -->
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/btnAll"
|
android:id="@+id/btnAll"
|
||||||
style="@style/Widget.Material3.Button.TonalButton"
|
style="@style/Widget.Material3.Button.TonalButton"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="64dp"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginStart="6dp"
|
||||||
|
android:paddingTop="24dp"
|
||||||
|
android:paddingBottom="24dp"
|
||||||
android:text="全部"
|
android:text="全部"
|
||||||
android:textSize="18sp"
|
android:textSize="16sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:cornerRadius="16dp"
|
android:textColor="@color/on_sky_blue_container"
|
||||||
app:backgroundTint="@color/sky_blue_primary"
|
app:backgroundTint="@color/sky_blue_container"
|
||||||
android:textColor="@color/white" />
|
app:icon="@drawable/ic_play"
|
||||||
|
app:iconGravity="top"
|
||||||
|
app:iconSize="28dp"
|
||||||
|
app:iconTint="@color/sky_blue_primary"
|
||||||
|
app:cornerRadius="20dp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user