add an activity for managing playlists
This commit is contained in:
parent
dfcabd7c23
commit
c4c20d999b
5 changed files with 52 additions and 0 deletions
|
@ -58,6 +58,11 @@
|
|||
android:label="@string/settings"
|
||||
android:parentActivityName=".activities.MainActivity"/>
|
||||
|
||||
<activity
|
||||
android:name=".activities.PlaylistsActivity"
|
||||
android:label="@string/manage_playlists"
|
||||
android:parentActivityName=".activities.SettingsActivity"/>
|
||||
|
||||
<service
|
||||
android:name=".services.MusicService"
|
||||
android:exported="false">
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
|
@ -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<RadioItem>()
|
||||
|
|
9
app/src/main/res/layout/activity_playlists.xml
Normal file
9
app/src/main/res/layout/activity_playlists.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v7.widget.RecyclerView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/playlists_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipToPadding="false"
|
||||
app:layoutManager="android.support.v7.widget.LinearLayoutManager"/>
|
|
@ -30,6 +30,25 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_manage_playlists_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/medium_margin"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:padding="@dimen/activity_margin">
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/settings_manage_playlists"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:paddingLeft="@dimen/medium_margin"
|
||||
android:paddingStart="@dimen/medium_margin"
|
||||
android:text="@string/manage_playlists"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_equalizer_holder"
|
||||
android:layout_width="match_parent"
|
||||
|
|
Loading…
Reference in a new issue