Compare commits
1
Commits
4f7eb94047
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a3fb57cb8 |
No files matched your search
@@ -35,6 +35,7 @@ public class SlideshowPlayerActivity extends AppCompatActivity {
|
||||
private ImageView ivSlideshow;
|
||||
private ImageView ivSlideshowBack;
|
||||
private View controlPanel;
|
||||
private View topBar;
|
||||
private TextView tvProgress;
|
||||
private SeekBar seekBarInterval;
|
||||
private TextView tvIntervalLabel;
|
||||
@@ -117,6 +118,7 @@ public class SlideshowPlayerActivity extends AppCompatActivity {
|
||||
ivSlideshow = findViewById(R.id.ivSlideshow);
|
||||
ivSlideshowBack = findViewById(R.id.ivSlideshowBack);
|
||||
controlPanel = findViewById(R.id.controlPanel);
|
||||
topBar = findViewById(R.id.topBar);
|
||||
tvProgress = findViewById(R.id.tvProgress);
|
||||
seekBarInterval = findViewById(R.id.seekBarInterval);
|
||||
tvIntervalLabel = findViewById(R.id.tvIntervalLabel);
|
||||
@@ -308,7 +310,7 @@ public class SlideshowPlayerActivity extends AppCompatActivity {
|
||||
private void pause() {
|
||||
isPlaying = false;
|
||||
stopAutoPlay();
|
||||
btnPlayPause.setIcon(getDrawable(android.R.drawable.ic_media_play));
|
||||
btnPlayPause.setIcon(getDrawable(R.drawable.ic_play));
|
||||
// 暂停时不隐藏控制面板
|
||||
hideHandler.removeCallbacks(hideRunnable);
|
||||
}
|
||||
@@ -316,7 +318,7 @@ public class SlideshowPlayerActivity extends AppCompatActivity {
|
||||
private void resume() {
|
||||
isPlaying = true;
|
||||
startAutoPlay();
|
||||
btnPlayPause.setIcon(getDrawable(android.R.drawable.ic_media_pause));
|
||||
btnPlayPause.setIcon(getDrawable(R.drawable.ic_pause));
|
||||
resetHideTimer();
|
||||
}
|
||||
|
||||
@@ -348,10 +350,10 @@ public class SlideshowPlayerActivity extends AppCompatActivity {
|
||||
// 使用不同图标表示当前模式
|
||||
if (isFullScreen) {
|
||||
// 当前是填充模式,点击切换到适应模式
|
||||
btnScaleMode.setIcon(getDrawable(android.R.drawable.ic_menu_crop));
|
||||
btnScaleMode.setIcon(getDrawable(R.drawable.ic_fit_screen));
|
||||
} 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)
|
||||
.start();
|
||||
|
||||
topBar.setVisibility(View.VISIBLE);
|
||||
topBar.setAlpha(0f);
|
||||
topBar.setTranslationY(-100f);
|
||||
topBar.animate()
|
||||
.alpha(1f)
|
||||
.translationY(0f)
|
||||
.setDuration(300)
|
||||
.start();
|
||||
|
||||
if (isPlaying) {
|
||||
resetHideTimer();
|
||||
}
|
||||
@@ -385,6 +396,13 @@ public class SlideshowPlayerActivity extends AppCompatActivity {
|
||||
.setDuration(300)
|
||||
.withEndAction(() -> controlPanel.setVisibility(View.GONE))
|
||||
.start();
|
||||
|
||||
topBar.animate()
|
||||
.alpha(0f)
|
||||
.translationY(-100f)
|
||||
.setDuration(300)
|
||||
.withEndAction(() -> topBar.setVisibility(View.GONE))
|
||||
.start();
|
||||
}
|
||||
|
||||
private void resetHideTimer() {
|
||||
@@ -408,7 +426,7 @@ public class SlideshowPlayerActivity extends AppCompatActivity {
|
||||
loadImage(currentIndex, false);
|
||||
endScreen.setVisibility(View.GONE);
|
||||
isPlaying = true;
|
||||
btnPlayPause.setIcon(getDrawable(android.R.drawable.ic_media_pause));
|
||||
btnPlayPause.setIcon(getDrawable(R.drawable.ic_pause));
|
||||
startAutoPlay();
|
||||
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"?>
|
||||
<FrameLayout
|
||||
<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:background="@android:color/black">
|
||||
|
||||
<!-- 双 ImageView 用于淡入淡出切换 -->
|
||||
<!-- Images -->
|
||||
<ImageView
|
||||
android:id="@+id/ivSlideshowBack"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitCenter"
|
||||
android:contentDescription="幻灯片图片背景" />
|
||||
android:contentDescription="Background Image" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivSlideshow"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitCenter"
|
||||
android:contentDescription="幻灯片图片" />
|
||||
android:contentDescription="Main Image" />
|
||||
|
||||
<!-- 控制面板 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/controlPanel"
|
||||
<!-- Top Gradient -->
|
||||
<View
|
||||
android:id="@+id/scrimTop"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:orientation="vertical"
|
||||
android:background="#CC000000"
|
||||
android:padding="24dp"
|
||||
android:visibility="visible">
|
||||
android:layout_height="120dp"
|
||||
android:background="@drawable/bg_gradient_scrim_top"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!-- Bottom Gradient -->
|
||||
<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
|
||||
android:id="@+id/tvProgress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="1 / 20"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16sp"
|
||||
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
|
||||
android:id="@+id/intervalContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="12dp">
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="间隔:"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@android:color/white"
|
||||
android:layout_marginEnd="8dp" />
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_schedule"
|
||||
app:tint="@android:color/white"
|
||||
android:alpha="0.8"/>
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/seekBarInterval"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:max="12"
|
||||
android:progress="2" />
|
||||
android:progress="2"
|
||||
android:progressTint="@color/sky_blue_primary"
|
||||
android:thumbTint="@color/sky_blue_primary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvIntervalLabel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="5 秒"
|
||||
android:textSize="14sp"
|
||||
android:text="5s"
|
||||
android:textColor="@android:color/white"
|
||||
android:layout_marginStart="8dp"
|
||||
android:minWidth="48dp"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:gravity="end" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 控制按钮 -->
|
||||
<!-- Playback Controls -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center">
|
||||
app:layout_constraintTop_toBottomOf="@id/intervalContainer">
|
||||
|
||||
<!-- 上一张 -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnPrevious"
|
||||
style="@style/Widget.Material3.Button.IconButton"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
app:icon="@android:drawable/ic_media_previous"
|
||||
app:iconSize="28dp"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
app:icon="@drawable/ic_skip_previous"
|
||||
app:iconSize="32dp"
|
||||
app:iconTint="@android:color/white"
|
||||
app:backgroundTint="#40FFFFFF"
|
||||
android:layout_marginEnd="4dp" />
|
||||
app:backgroundTint="#20FFFFFF"
|
||||
android:layout_marginEnd="16dp" />
|
||||
|
||||
<!-- 播放/暂停 -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnPlayPause"
|
||||
style="@style/Widget.Material3.Button.IconButton"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
app:icon="@android:drawable/ic_media_pause"
|
||||
app:iconSize="32dp"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
app:icon="@drawable/ic_pause"
|
||||
app:iconSize="40dp"
|
||||
app:iconTint="@android:color/white"
|
||||
app:backgroundTint="#60FFFFFF"
|
||||
android:layout_marginHorizontal="4dp" />
|
||||
app:backgroundTint="@color/sky_blue_primary"
|
||||
app:elevation="4dp" />
|
||||
|
||||
<!-- 下一张 -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnNext"
|
||||
style="@style/Widget.Material3.Button.IconButton"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
app:icon="@android:drawable/ic_media_next"
|
||||
app:iconSize="28dp"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
app:icon="@drawable/ic_skip_next"
|
||||
app:iconSize="32dp"
|
||||
app:iconTint="@android:color/white"
|
||||
app:backgroundTint="#40FFFFFF"
|
||||
android:layout_marginStart="4dp" />
|
||||
|
||||
<!-- 分隔 -->
|
||||
<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" />
|
||||
app:backgroundTint="#20FFFFFF"
|
||||
android:layout_marginStart="16dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<!-- 播放结束界面 -->
|
||||
<!-- End Screen -->
|
||||
<LinearLayout
|
||||
android:id="@+id/endScreen"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:background="#CC000000"
|
||||
android:visibility="gone">
|
||||
android:background="#E6000000"
|
||||
android:visibility="gone"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -181,7 +214,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 重新播放 -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnReplay"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
@@ -189,13 +221,13 @@
|
||||
android:layout_height="56dp"
|
||||
android:text="重新播放"
|
||||
android:textSize="16sp"
|
||||
app:icon="@drawable/ic_refresh"
|
||||
app:backgroundTint="@color/sky_blue_primary"
|
||||
android:textColor="@android:color/white"
|
||||
app:cornerRadius="28dp"
|
||||
android:paddingHorizontal="32dp"
|
||||
android:layout_marginEnd="16dp" />
|
||||
|
||||
<!-- 退出 -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnExitEnd"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
@@ -205,6 +237,8 @@
|
||||
android:textSize="16sp"
|
||||
app:strokeColor="@android:color/white"
|
||||
android:textColor="@android:color/white"
|
||||
app:icon="@drawable/ic_close"
|
||||
app:iconTint="@android:color/white"
|
||||
app:cornerRadius="28dp"
|
||||
android:paddingHorizontal="32dp" />
|
||||
|
||||
@@ -212,4 +246,4 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -6,88 +6,133 @@
|
||||
android:layout_height="match_parent"
|
||||
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
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp"
|
||||
android:paddingBottom="100dp"
|
||||
android:gravity="center_horizontal">
|
||||
android:padding="@dimen/spacing_md"
|
||||
android:paddingBottom="100dp">
|
||||
|
||||
<!-- Title -->
|
||||
<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 -->
|
||||
<!-- Source Info Card -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="32dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
app:cardCornerRadius="20dp"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeWidth="1dp"
|
||||
app:strokeColor="@color/bg_secondary_modern"
|
||||
app:strokeColor="#F0F0F0"
|
||||
app:cardBackgroundColor="@color/white">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
android:orientation="horizontal"
|
||||
android:padding="20dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="当前相册"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/text_hint"
|
||||
android:textAllCaps="true"
|
||||
android:letterSpacing="0.1"
|
||||
android:layout_marginBottom="8dp" />
|
||||
<!-- Icon -->
|
||||
<FrameLayout
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:background="@drawable/bg_icon_container_sky"
|
||||
android:backgroundTint="@color/sky_blue_container">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAlbumName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="默认相册"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary"
|
||||
android:layout_marginBottom="4dp" />
|
||||
<ImageView
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_album"
|
||||
app:tint="@color/sky_blue_primary" />
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvImageCount"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0 张图片"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/text_secondary" />
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="16dp"
|
||||
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>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Selection Title -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="选择播放数量"
|
||||
android:textSize="16sp"
|
||||
@@ -95,70 +140,107 @@
|
||||
android:textColor="@color/text_primary"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<!-- Option Buttons -->
|
||||
<!-- Row 1 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center">
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="12dp">
|
||||
|
||||
<!-- 10 张 -->
|
||||
<!-- 10 Photos -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn10"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingBottom="24dp"
|
||||
android:text="10 张"
|
||||
android:textSize="18sp"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:cornerRadius="16dp"
|
||||
app:strokeWidth="2dp"
|
||||
app:strokeColor="@color/sky_blue_primary"
|
||||
android:textColor="@color/sky_blue_primary"
|
||||
android:layout_marginBottom="12dp" />
|
||||
android:textColor="@color/text_primary"
|
||||
app:icon="@drawable/ic_image"
|
||||
app:iconGravity="top"
|
||||
app:iconSize="28dp"
|
||||
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
|
||||
android:id="@+id/btn20"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="6dp"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingBottom="24dp"
|
||||
android:text="20 张"
|
||||
android:textSize="18sp"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:cornerRadius="16dp"
|
||||
app:strokeWidth="2dp"
|
||||
app:strokeColor="@color/sky_blue_primary"
|
||||
android:textColor="@color/sky_blue_primary"
|
||||
android:layout_marginBottom="12dp" />
|
||||
android:textColor="@color/text_primary"
|
||||
app:icon="@drawable/ic_image"
|
||||
app:iconGravity="top"
|
||||
app:iconSize="28dp"
|
||||
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
|
||||
android:id="@+id/btn50"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingBottom="24dp"
|
||||
android:text="50 张"
|
||||
android:textSize="18sp"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:cornerRadius="16dp"
|
||||
app:strokeWidth="2dp"
|
||||
app:strokeColor="@color/sky_blue_primary"
|
||||
android:textColor="@color/sky_blue_primary"
|
||||
android:layout_marginBottom="12dp" />
|
||||
android:textColor="@color/text_primary"
|
||||
app:icon="@drawable/ic_image"
|
||||
app:iconGravity="top"
|
||||
app:iconSize="28dp"
|
||||
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
|
||||
android:id="@+id/btnAll"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="6dp"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingBottom="24dp"
|
||||
android:text="全部"
|
||||
android:textSize="18sp"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:cornerRadius="16dp"
|
||||
app:backgroundTint="@color/sky_blue_primary"
|
||||
android:textColor="@color/white" />
|
||||
android:textColor="@color/on_sky_blue_container"
|
||||
app:backgroundTint="@color/sky_blue_container"
|
||||
app:icon="@drawable/ic_play"
|
||||
app:iconGravity="top"
|
||||
app:iconSize="28dp"
|
||||
app:iconTint="@color/sky_blue_primary"
|
||||
app:cornerRadius="20dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
Reference in new issue
Block a user