Added backup & restore in settings
This commit is contained in:
parent
d703a05182
commit
5a73565182
4 changed files with 17 additions and 0 deletions
|
@ -45,6 +45,7 @@ class MainSettingsFragment : Fragment(), View.OnClickListener {
|
|||
R.id.otherSettings -> findNavController().navigate(R.id.action_mainSettingsFragment_to_otherSettingsFragment)
|
||||
R.id.aboutSettings -> findNavController().navigate(R.id.action_mainSettingsFragment_to_aboutActivity)
|
||||
R.id.nowPlayingSettings -> findNavController().navigate(R.id.action_mainSettingsFragment_to_nowPlayingSettingsFragment)
|
||||
R.id.backup_restore_settings -> NavigationUtil.gotoBackup(requireActivity())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -68,6 +69,7 @@ class MainSettingsFragment : Fragment(), View.OnClickListener {
|
|||
binding.notificationSettings.setOnClickListener(this)
|
||||
binding.otherSettings.setOnClickListener(this)
|
||||
binding.aboutSettings.setOnClickListener(this)
|
||||
binding.backupRestoreSettings.setOnClickListener(this)
|
||||
|
||||
binding.buyProContainer.apply {
|
||||
if (App.isProVersion()) hide() else show()
|
||||
|
|
|
@ -23,6 +23,7 @@ import androidx.core.app.ActivityCompat
|
|||
import androidx.navigation.findNavController
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.activities.*
|
||||
import code.name.monkey.retromusic.activities.backup.BackupActivity
|
||||
import code.name.monkey.retromusic.activities.bugreport.BugReportActivity
|
||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote.audioSessionId
|
||||
import com.google.android.material.bottomsheet.BottomSheetBehavior
|
||||
|
@ -77,6 +78,10 @@ object NavigationUtil {
|
|||
ActivityCompat.startActivity(activity, Intent(activity, WhatsNewActivity::class.java), null)
|
||||
}
|
||||
|
||||
fun gotoBackup(activity: Activity) {
|
||||
ActivityCompat.startActivity(activity, Intent(activity, BackupActivity::class.java), null)
|
||||
}
|
||||
|
||||
fun openEqualizer(activity: Activity) {
|
||||
stockEqualizer(activity)
|
||||
}
|
||||
|
|
|
@ -160,6 +160,14 @@
|
|||
app:settingListItemText="@string/other_settings_summary"
|
||||
app:settingListItemTitle="@string/others" />
|
||||
|
||||
<code.name.monkey.retromusic.views.SettingListItemView
|
||||
android:id="@+id/backup_restore_settings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:settingListItemIcon="@drawable/ic_restore"
|
||||
app:settingListItemIconColor="@color/md_cyan_400"
|
||||
app:settingListItemText="TODO"
|
||||
app:settingListItemTitle="@string/backup_restore_title" />
|
||||
|
||||
<code.name.monkey.retromusic.views.SettingListItemView
|
||||
android:id="@+id/aboutSettings"
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
<color name="md_blue_500">#2196F3</color>
|
||||
<color name="md_blue_A400">#2979FF</color>
|
||||
|
||||
<color name="md_cyan_400">#26c6da</color>
|
||||
|
||||
<color name="md_green_A700">#00C853</color>
|
||||
<color name="md_green_500">#4CAF50</color>
|
||||
|
||||
|
|
Loading…
Reference in a new issue