From c4c20d999b180c590f86fd259e64632daf23268f Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 29 Mar 2017 20:01:30 +0200 Subject: [PATCH] add an activity for managing playlists --- app/src/main/AndroidManifest.xml | 5 +++++ .../activities/PlaylistsActivity.kt | 11 +++++++++++ .../activities/SettingsActivity.kt | 8 ++++++++ .../main/res/layout/activity_playlists.xml | 9 +++++++++ app/src/main/res/layout/activity_settings.xml | 19 +++++++++++++++++++ 5 files changed, 52 insertions(+) create mode 100644 app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/PlaylistsActivity.kt create mode 100644 app/src/main/res/layout/activity_playlists.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 1729b02b..add7c05b 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -58,6 +58,11 @@ android:label="@string/settings" android:parentActivityName=".activities.MainActivity"/> + + diff --git a/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/PlaylistsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/PlaylistsActivity.kt new file mode 100644 index 00000000..9bd47fa7 --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/PlaylistsActivity.kt @@ -0,0 +1,11 @@ +package com.simplemobiletools.musicplayer.activities + +import android.os.Bundle +import com.simplemobiletools.musicplayer.R + +class PlaylistsActivity : SimpleActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_playlists) + } +} diff --git a/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/SettingsActivity.kt index bf9cc678..35c2a819 100644 --- a/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/SettingsActivity.kt @@ -1,5 +1,6 @@ package com.simplemobiletools.musicplayer.activities +import android.content.Intent import android.os.Bundle import com.simplemobiletools.commons.dialogs.RadioGroupDialog import com.simplemobiletools.commons.extensions.updateTextColors @@ -19,6 +20,7 @@ class SettingsActivity : SimpleActivity() { super.onResume() setupCustomizeColors() + setupManagePlaylists() setupEqualizer() updateTextColors(settings_scrollview) } @@ -29,6 +31,12 @@ class SettingsActivity : SimpleActivity() { } } + private fun setupManagePlaylists() { + settings_manage_playlists_holder.setOnClickListener { + startActivity(Intent(this, PlaylistsActivity::class.java)) + } + } + private fun setupEqualizer() { val equalizer = MusicService.mEqualizer ?: return val items = arrayListOf() diff --git a/app/src/main/res/layout/activity_playlists.xml b/app/src/main/res/layout/activity_playlists.xml new file mode 100644 index 00000000..4fa15fd4 --- /dev/null +++ b/app/src/main/res/layout/activity_playlists.xml @@ -0,0 +1,9 @@ + + diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 46fdbdf4..215f1dc6 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -30,6 +30,25 @@ + + + + + +