Commit 3c155efb by 范玉宾

meditation play custom seek_bar done time off to be continue

Took 3 minutes
parent 38471d10
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yidianling.muse">
package="com.yidianling.muse">
<application>
<activity
android:name=".activity.MuseActivity"
android:screenOrientation="portrait"/>
android:name=".activity.MuseActivity"
android:screenOrientation="portrait" />
<activity
android:name=".activity.MuseCenterActivity"
android:screenOrientation="portrait"
android:theme="@style/muse_Transparent"/>
android:name=".activity.MuseCenterActivity"
android:screenOrientation="portrait"
android:theme="@style/muse_Transparent" />
<activity android:name=".activity.PlayMeditationActivity"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" />
<activity android:name=".activity.PlayPureMusicActivity"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" />
<activity android:name=".activity.MeditationTimeOffActivity" />
<activity
android:name=".activity.PlayMeditationActivity"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" />
<activity
android:name=".activity.PlayPureMusicActivity"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" />
<activity
android:name=".activity.MeditationTimeOffActivity"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" />
</application>
</manifest>
package com.yidianling.muse.activity
import android.content.Intent
import android.media.MediaPlayer
import android.os.Bundle
import android.widget.SeekBar
......@@ -131,7 +132,7 @@ class PlayMeditationActivity : BaseActivity() {
}
iv_time_off.setOnClickListener {
ToastHelper.show("设置定时关闭!")
startActivity(Intent(this,MeditationTimeOffActivity::class.java))
}
exo_play.setOnClickListener {
......
......@@ -4,6 +4,6 @@
<corners android:radius="8dp"/>
<stroke android:width="1dp" android:color="#66282E3F"/>
<stroke android:width="1dp" android:color="#FFFFFFFF"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<corners android:radius="2dp"/>
<solid android:color="#33282E3F"/>
</shape>
</item>
<item android:id="@android:id/progress">
<clip>
<shape>
<corners android:radius="2dp"/>
<solid android:color="@color/white"/>
</shape>
</clip>
</item>
</layer-list>
\ No newline at end of file
......@@ -109,7 +109,7 @@
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- app:controller_layout_id="@layout/exo_player_control_view" />-->
<include layout="@layout/exo_player_control_view" />
<include layout="@layout/player_control_view" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guide_line"
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
tools:background="#66282E3F"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FF173F5D">
<ImageView
android:id="@+id/iv_close"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="50dp"
android:layout_marginEnd="24dp"
android:padding="12dp"
android:src="@drawable/icon_play_meditation_time_off_close"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
android:id="@+id/iv_close"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="50dp"
android:layout_marginEnd="24dp"
android:padding="12dp"
android:src="@drawable/icon_play_meditation_time_off_close"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="90dp"
android:text="定时关闭"
android:textColor="@color/white"
android:textStyle="bold"
android:textSize="24sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_close"/>
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="90dp"
android:text="定时关闭"
android:textColor="@color/white"
android:textStyle="bold"
android:textSize="24sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_close" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent">
</LinearLayout>
<TextView
android:id="@+id/tv_cancel_time_off"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginBottom="50dp"
android:layout_marginHorizontal="16dp"
android:background="@drawable/bg_cancel_play_meditation_time_off"
android:text="关闭定时"
android:textColor="@color/white"
android:textSize="16sp"
android:gravity="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
android:id="@+id/tv_cancel_time_off"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginBottom="50dp"
android:layout_marginHorizontal="16dp"
android:background="@drawable/bg_cancel_play_meditation_time_off"
android:text="关闭定时"
android:textColor="@color/white"
android:textSize="16sp"
android:gravity="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent" />
<TextView
android:id="@+id/tv_save_setting"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginBottom="28dp"
android:layout_marginHorizontal="16dp"
android:background="@drawable/bg_save_play_meditation_time_off"
android:text="保存设置"
android:textColor="#FF282E3F"
android:textSize="16sp"
android:gravity="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@id/tv_cancel_time_off"/>
android:id="@+id/tv_save_setting"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginBottom="28dp"
android:layout_marginHorizontal="16dp"
android:background="@drawable/bg_save_play_meditation_time_off"
android:text="保存设置"
android:textColor="#FF282E3F"
android:textSize="16sp"
android:gravity="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@id/tv_cancel_time_off" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -59,8 +59,15 @@
android:id="@+id/seekbar_play_progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="4dp"
android:maxHeight="4dp"
android:layout_marginHorizontal="64dp"
android:layout_marginBottom="50dp"
android:thumb="@drawable/play_meditation_thumb"
android:progressDrawable="@drawable/meditation_seekbar_bg"
android:thumbOffset="0dp"
android:paddingStart="0dp"
android:paddingEnd="0dp"
app:layout_constraintBottom_toTopOf="@id/exo_play"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment