Merge pull request #1411 from RetroMusicPlayer/dev-alpha

Dev alpha
This commit is contained in:
Daksh P. Jain 2022-08-14 19:09:46 +05:30 committed by GitHub
commit b70cd181d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
236 changed files with 1105 additions and 2486 deletions

View file

@ -111,9 +111,9 @@ dependencies {
implementation "androidx.core:core-ktx:$core_version" implementation "androidx.core:core-ktx:$core_version"
implementation 'androidx.palette:palette-ktx:1.0.0' implementation 'androidx.palette:palette-ktx:1.0.0'
implementation 'androidx.mediarouter:mediarouter:1.3.0' implementation 'androidx.mediarouter:mediarouter:1.3.1'
//Cast Dependencies //Cast Dependencies
normalImplementation 'com.google.android.gms:play-services-cast-framework:21.0.1' normalImplementation 'com.google.android.gms:play-services-cast-framework:21.1.0'
//WebServer by NanoHttpd //WebServer by NanoHttpd
normalImplementation "org.nanohttpd:nanohttpd:2.3.1" normalImplementation "org.nanohttpd:nanohttpd:2.3.1"
@ -130,7 +130,7 @@ dependencies {
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
implementation "androidx.core:core-splashscreen:1.0.0-rc01" implementation "androidx.core:core-splashscreen:1.0.0"
normalImplementation 'com.google.android.play:feature-delivery:2.0.0' normalImplementation 'com.google.android.play:feature-delivery:2.0.0'
normalImplementation 'com.google.android.play:review:2.0.0' normalImplementation 'com.google.android.play:review:2.0.0'

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="download_policy">never</string>
</resources>

View file

@ -21,6 +21,7 @@
android:name="android.permission.WRITE_SETTINGS" android:name="android.permission.WRITE_SETTINGS"
tools:ignore="ProtectedPermissions" /> tools:ignore="ProtectedPermissions" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
<uses-permission <uses-permission
android:name="android.permission.BLUETOOTH_CONNECT" android:name="android.permission.BLUETOOTH_CONNECT"
android:usesPermissionFlags="neverForLocation" android:usesPermissionFlags="neverForLocation"
@ -54,7 +55,6 @@
</intent-filter> </intent-filter>
<intent-filter> <intent-filter>
<action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH" /> <action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
</intent-filter> </intent-filter>
<intent-filter> <intent-filter>
@ -124,7 +124,8 @@
<activity android:name=".activities.PermissionActivity" /> <activity android:name=".activities.PermissionActivity" />
<activity <activity
android:name=".activities.LockScreenActivity" android:name=".activities.LockScreenActivity"
android:launchMode="singleTop" android:excludeFromRecents="true"
android:launchMode="singleTask"
android:showOnLockScreen="true" /> android:showOnLockScreen="true" />
<activity <activity
android:name=".fragments.backup.RestoreActivity" android:name=".fragments.backup.RestoreActivity"

View file

@ -3,36 +3,36 @@
"name": "Hemanth Savarala", "name": "Hemanth Savarala",
"summary": "Lead Developer & Designer", "summary": "Lead Developer & Designer",
"link": "https://github.com/h4h13", "link": "https://github.com/h4h13",
"image": "https://i.imgur.com/AoVs9oj.jpg" "image": "hemanth.jpg"
}, },
{ {
"name": "Prathamesh More", "name": "Prathamesh More",
"summary": "Developer", "summary": "Developer",
"link": "https://prathameshmm02.github.io", "link": "https://prathameshmm02.github.io",
"image": "https://i.imgur.com/ZHoOrHx.jpg" "image": "pratham.jpg"
}, },
{ {
"name": "Daksh P. Jain", "name": "Daksh P. Jain",
"summary": "Website & GitHub Maintainer", "summary": "Website & GitHub Maintainer",
"link": "https://daksh.eu.org", "link": "https://daksh.eu.org",
"image": "https://i.imgur.com/fnYpg65.jpg" "image": "daksh.png"
}, },
{ {
"name": "Milind Goel", "name": "Milind Goel",
"summary": "Support Representative & Moderator", "summary": "Support Representative & Moderator",
"link": "https://milindgoel.vercel.app", "link": "https://milindgoel.vercel.app",
"image": "https://i.imgur.com/hWL8t48.jpg" "image": "milind.png"
}, },
{ {
"name": "Lennart Glamann", "name": "Lennart Glamann",
"summary": "Play Store Banner & Images", "summary": "Play Store Banner & Images",
"link": "https://telegram.me/FlixbusLennart", "link": "https://telegram.me/FlixbusLennart",
"image": "https://i.imgur.com/Q5Nsx1R.jpg" "image": "lenny.jpg"
}, },
{ {
"name": "Haythem Gataa", "name": "Haythem Gataa",
"summary": "App Logo & Banners", "summary": "App Logo & Banners",
"link": "https://dribbble.com/haythemgataa", "link": "https://dribbble.com/haythemgataa",
"image": "https://i.imgur.com/g5RuIZq.jpg" "image": "haythem.jpg"
} }
] ]

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

@ -62,6 +62,14 @@
</head> </head>
<body> <body>
<div>
<h5>July 10, 2022</h5>
<h2>v6.0.3<span class="tag"><i>Beta</i></span></h2>
<h3>Fixed</h3>
<ul>
<li>Migrated icons to Material symbols</li>
</ul>
</div>
<div> <div>
<h5>June 21, 2022</h5> <h5>June 21, 2022</h5>
<h2>v6.0.2<span class="tag"><i>Beta</i></span></h2> <h2>v6.0.2<span class="tag"><i>Beta</i></span></h2>

View file

@ -84,12 +84,11 @@ class LockScreenActivity : AbsMusicServiceActivity() {
private fun lockScreenInit() { private fun lockScreenInit() {
if (VersionUtils.hasOreoMR1()) { if (VersionUtils.hasOreoMR1()) {
setShowWhenLocked(true) setShowWhenLocked(true)
val keyguardManager = getSystemService<KeyguardManager>() //setTurnScreenOn(true)
keyguardManager?.requestDismissKeyguard(this, null)
} else { } else {
this.window.addFlags( window.addFlags(
WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD or WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED // or WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON
) )
} }
} }

View file

@ -19,18 +19,15 @@ import android.view.MenuItem
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
import code.name.monkey.retromusic.activities.base.AbsThemeActivity import code.name.monkey.retromusic.activities.base.AbsThemeActivity
import code.name.monkey.retromusic.databinding.ActivityDonationBinding import code.name.monkey.retromusic.databinding.ActivityDonationBinding
import code.name.monkey.retromusic.extensions.openUrl
import code.name.monkey.retromusic.extensions.setStatusBarColorAuto import code.name.monkey.retromusic.extensions.setStatusBarColorAuto
import code.name.monkey.retromusic.extensions.setTaskDescriptionColorAuto import code.name.monkey.retromusic.extensions.setTaskDescriptionColorAuto
import code.name.monkey.retromusic.extensions.surfaceColor import code.name.monkey.retromusic.extensions.surfaceColor
class SupportDevelopmentActivity : AbsThemeActivity() { class SupportDevelopmentActivity : AbsThemeActivity() {
lateinit var binding: ActivityDonationBinding lateinit var binding: ActivityDonationBinding
companion object {
val TAG: String = SupportDevelopmentActivity::class.java.simpleName
}
override fun onOptionsItemSelected(item: MenuItem): Boolean { override fun onOptionsItemSelected(item: MenuItem): Boolean {
if (item.itemId == android.R.id.home) { if (item.itemId == android.R.id.home) {
onBackPressed() onBackPressed()
@ -49,6 +46,12 @@ class SupportDevelopmentActivity : AbsThemeActivity() {
setupToolbar() setupToolbar()
binding.paypal.setOnClickListener {
openUrl(PAYPAL_URL)
}
binding.kofi.setOnClickListener {
openUrl(KOFI_URL)
}
} }
private fun setupToolbar() { private fun setupToolbar() {
@ -56,4 +59,9 @@ class SupportDevelopmentActivity : AbsThemeActivity() {
ToolbarContentTintHelper.colorBackButton(binding.toolbar) ToolbarContentTintHelper.colorBackButton(binding.toolbar)
setSupportActionBar(binding.toolbar) setSupportActionBar(binding.toolbar)
} }
companion object {
const val PAYPAL_URL = "https://paypal.me/quickersilver"
const val KOFI_URL = "https://ko-fi.com/quickersilver"
}
} }

View file

@ -19,53 +19,17 @@ import android.content.ClipboardManager
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.Bundle
import android.view.MenuItem import android.view.MenuItem
import android.view.inputmethod.EditorInfo
import androidx.annotation.StringDef
import androidx.annotation.StringRes
import androidx.core.content.getSystemService import androidx.core.content.getSystemService
import androidx.core.net.toUri import androidx.core.net.toUri
import androidx.lifecycle.lifecycleScope
import code.name.monkey.appthemehelper.util.MaterialUtil
import code.name.monkey.appthemehelper.util.TintHelper import code.name.monkey.appthemehelper.util.TintHelper
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.activities.base.AbsThemeActivity import code.name.monkey.retromusic.activities.base.AbsThemeActivity
import code.name.monkey.retromusic.activities.bugreport.model.DeviceInfo import code.name.monkey.retromusic.activities.bugreport.model.DeviceInfo
import code.name.monkey.retromusic.activities.bugreport.model.Report
import code.name.monkey.retromusic.activities.bugreport.model.github.ExtraInfo
import code.name.monkey.retromusic.activities.bugreport.model.github.GithubLogin
import code.name.monkey.retromusic.activities.bugreport.model.github.GithubTarget
import code.name.monkey.retromusic.databinding.ActivityBugReportBinding import code.name.monkey.retromusic.databinding.ActivityBugReportBinding
import code.name.monkey.retromusic.extensions.accentColor import code.name.monkey.retromusic.extensions.accentColor
import code.name.monkey.retromusic.extensions.setTaskDescriptionColorAuto import code.name.monkey.retromusic.extensions.setTaskDescriptionColorAuto
import code.name.monkey.retromusic.extensions.showToast import code.name.monkey.retromusic.extensions.showToast
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.floatingactionbutton.FloatingActionButton
import com.google.android.material.textfield.TextInputLayout
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import org.eclipse.egit.github.core.Issue
import org.eclipse.egit.github.core.client.GitHubClient
import org.eclipse.egit.github.core.client.RequestException
import org.eclipse.egit.github.core.service.IssueService
import java.io.IOException
private const val RESULT_SUCCESS = "RESULT_OK"
private const val RESULT_BAD_CREDENTIALS = "RESULT_BAD_CREDENTIALS"
private const val RESULT_INVALID_TOKEN = "RESULT_INVALID_TOKEN"
private const val RESULT_ISSUES_NOT_ENABLED = "RESULT_ISSUES_NOT_ENABLED"
private const val RESULT_UNKNOWN = "RESULT_UNKNOWN"
@StringDef(
RESULT_SUCCESS,
RESULT_BAD_CREDENTIALS,
RESULT_INVALID_TOKEN,
RESULT_ISSUES_NOT_ENABLED,
RESULT_UNKNOWN
)
@Retention(AnnotationRetention.SOURCE)
private annotation class Result
open class BugReportActivity : AbsThemeActivity() { open class BugReportActivity : AbsThemeActivity() {
@ -91,72 +55,19 @@ open class BugReportActivity : AbsThemeActivity() {
setSupportActionBar(binding.toolbar) setSupportActionBar(binding.toolbar)
ToolbarContentTintHelper.colorBackButton(binding.toolbar) ToolbarContentTintHelper.colorBackButton(binding.toolbar)
supportActionBar?.setDisplayHomeAsUpEnabled(true) supportActionBar?.setDisplayHomeAsUpEnabled(true)
TintHelper.setTintAuto(binding.cardReport.optionUseAccount, accentColor, false)
binding.cardReport.optionUseAccount.setOnClickListener {
binding.cardReport.inputTitle.isEnabled = true
binding.cardReport.inputDescription.isEnabled = true
binding.cardReport.inputUsername.isEnabled = true
binding.cardReport.inputPassword.isEnabled = true
binding.cardReport.optionAnonymous.isChecked = false
binding.sendFab.hide(object : FloatingActionButton.OnVisibilityChangedListener() {
override fun onHidden(fab: FloatingActionButton?) {
super.onHidden(fab)
binding.sendFab.setImageResource(R.drawable.ic_send)
binding.sendFab.show()
}
})
}
TintHelper.setTintAuto(binding.cardReport.optionAnonymous, accentColor, false)
binding.cardReport.optionAnonymous.setOnClickListener {
binding.cardReport.inputTitle.isEnabled = false
binding.cardReport.inputDescription.isEnabled = false
binding.cardReport.inputUsername.isEnabled = false
binding.cardReport.inputPassword.isEnabled = false
binding.cardReport.optionUseAccount.isChecked = false
binding.sendFab.hide(object : FloatingActionButton.OnVisibilityChangedListener() {
override fun onHidden(fab: FloatingActionButton?) {
super.onHidden(fab)
binding.sendFab.setImageResource(R.drawable.ic_open_in_browser)
binding.sendFab.show()
}
})
}
binding.cardReport.inputPassword.setOnEditorActionListener { _, actionId, _ ->
if (actionId == EditorInfo.IME_ACTION_SEND) {
reportIssue()
return@setOnEditorActionListener true
}
false
}
binding.cardDeviceInfo.airTextDeviceInfo.setOnClickListener { copyDeviceInfoToClipBoard() } binding.cardDeviceInfo.airTextDeviceInfo.setOnClickListener { copyDeviceInfoToClipBoard() }
TintHelper.setTintAuto(binding.sendFab, accentColor, true) TintHelper.setTintAuto(binding.sendFab, accentColor, true)
binding.sendFab.setOnClickListener { reportIssue() } binding.sendFab.setOnClickListener { reportIssue() }
MaterialUtil.setTint(binding.cardReport.inputLayoutTitle, false)
MaterialUtil.setTint(binding.cardReport.inputLayoutDescription, false)
MaterialUtil.setTint(binding.cardReport.inputLayoutUsername, false)
MaterialUtil.setTint(binding.cardReport.inputLayoutPassword, false)
} }
private fun reportIssue() { private fun reportIssue() {
if (binding.cardReport.optionUseAccount.isChecked) { copyDeviceInfoToClipBoard()
if (!validateInput()) return val i = Intent(Intent.ACTION_VIEW)
val username = binding.cardReport.inputUsername.text.toString() i.data = ISSUE_TRACKER_LINK.toUri()
val password = binding.cardReport.inputPassword.text.toString() i.flags = Intent.FLAG_ACTIVITY_NEW_TASK
sendBugReport(GithubLogin(username, password)) startActivity(i)
} else {
copyDeviceInfoToClipBoard()
val i = Intent(Intent.ACTION_VIEW)
i.data = ISSUE_TRACKER_LINK.toUri()
i.flags = Intent.FLAG_ACTIVITY_NEW_TASK
startActivity(i)
}
} }
private fun copyDeviceInfoToClipBoard() { private fun copyDeviceInfoToClipBoard() {
@ -166,67 +77,6 @@ open class BugReportActivity : AbsThemeActivity() {
showToast(R.string.copied_device_info_to_clipboard) showToast(R.string.copied_device_info_to_clipboard)
} }
private fun validateInput(): Boolean {
var hasErrors = false
if (binding.cardReport.optionUseAccount.isChecked) {
if (binding.cardReport.inputUsername.text.isNullOrEmpty()) {
setError(binding.cardReport.inputLayoutUsername, R.string.bug_report_no_username)
hasErrors = true
} else {
removeError(binding.cardReport.inputLayoutUsername)
}
if (binding.cardReport.inputPassword.text.isNullOrEmpty()) {
setError(binding.cardReport.inputLayoutPassword, R.string.bug_report_no_password)
hasErrors = true
} else {
removeError(binding.cardReport.inputLayoutPassword)
}
}
if (binding.cardReport.inputTitle.text.isNullOrEmpty()) {
setError(binding.cardReport.inputLayoutTitle, R.string.bug_report_no_title)
hasErrors = true
} else {
removeError(binding.cardReport.inputLayoutTitle)
}
if (binding.cardReport.inputDescription.text.isNullOrEmpty()) {
setError(binding.cardReport.inputLayoutDescription, R.string.bug_report_no_description)
hasErrors = true
} else {
removeError(binding.cardReport.inputLayoutDescription)
}
return !hasErrors
}
private fun setError(editTextLayout: TextInputLayout, @StringRes errorRes: Int) {
editTextLayout.error = getString(errorRes)
}
private fun removeError(editTextLayout: TextInputLayout) {
editTextLayout.error = null
}
private fun sendBugReport(login: GithubLogin) {
if (!validateInput()) return
val bugTitle = binding.cardReport.inputTitle.text.toString()
val bugDescription = binding.cardReport.inputDescription.text.toString()
val extraInfo = ExtraInfo()
onSaveExtraInfo()
val report = Report(bugTitle, bugDescription, deviceInfo, extraInfo)
val target = GithubTarget("RetroMusicPlayer", "RetroMusicPlayer")
reportIssue(report, target, login)
}
private fun onSaveExtraInfo() {}
override fun onOptionsItemSelected(item: MenuItem): Boolean { override fun onOptionsItemSelected(item: MenuItem): Boolean {
if (item.itemId == android.R.id.home) { if (item.itemId == android.R.id.home) {
onBackPressed() onBackPressed()
@ -234,83 +84,8 @@ open class BugReportActivity : AbsThemeActivity() {
return super.onOptionsItemSelected(item) return super.onOptionsItemSelected(item)
} }
private fun reportIssue(
report: Report,
target: GithubTarget,
login: GithubLogin
) {
val client: GitHubClient = if (login.shouldUseApiToken()) {
GitHubClient().setOAuth2Token(login.apiToken)
} else {
GitHubClient().setCredentials(login.username, login.password)
}
val issue = Issue().setTitle(report.title).setBody(report.getDescription())
lifecycleScope.launch(Dispatchers.IO) {
val result = try {
IssueService(client).createIssue(target.username, target.repository, issue)
RESULT_SUCCESS
} catch (e: RequestException) {
when (e.status) {
STATUS_BAD_CREDENTIALS -> {
if (login.shouldUseApiToken()) RESULT_INVALID_TOKEN else RESULT_BAD_CREDENTIALS
}
STATUS_ISSUES_NOT_ENABLED -> RESULT_ISSUES_NOT_ENABLED
else -> {
RESULT_UNKNOWN
throw e
}
}
} catch (e: IOException) {
e.printStackTrace()
RESULT_UNKNOWN
}
withContext(Dispatchers.Main) {
val activity = this@BugReportActivity
when (result) {
RESULT_SUCCESS -> MaterialAlertDialogBuilder(activity)
.setTitle(R.string.bug_report_success)
.setPositiveButton(android.R.string.ok) { _, _ -> tryToFinishActivity() }
.show()
RESULT_BAD_CREDENTIALS -> MaterialAlertDialogBuilder(activity)
.setTitle(R.string.bug_report_failed)
.setMessage(R.string.bug_report_failed_wrong_credentials)
.setPositiveButton(android.R.string.ok, null)
.show()
RESULT_INVALID_TOKEN -> MaterialAlertDialogBuilder(activity)
.setTitle(R.string.bug_report_failed)
.setMessage(R.string.bug_report_failed_invalid_token)
.setPositiveButton(android.R.string.ok, null)
.show()
RESULT_ISSUES_NOT_ENABLED -> MaterialAlertDialogBuilder(activity)
.setTitle(R.string.bug_report_failed)
.setMessage(R.string.bug_report_failed_issues_not_available)
.setPositiveButton(android.R.string.ok, null)
.show()
else -> MaterialAlertDialogBuilder(activity)
.setTitle(R.string.bug_report_failed)
.setMessage(R.string.bug_report_failed_unknown)
.setPositiveButton(android.R.string.ok) { _, _ -> tryToFinishActivity() }
.setNegativeButton(android.R.string.cancel) { _, _ -> tryToFinishActivity() }
.show()
}
}
}
}
private fun tryToFinishActivity() {
if (!isFinishing) {
finish()
}
}
companion object { companion object {
private const val STATUS_BAD_CREDENTIALS = 401
private const val STATUS_ISSUES_NOT_ENABLED = 410
private const val ISSUE_TRACKER_LINK = private const val ISSUE_TRACKER_LINK =
"https://github.com/RetroMusicPlayer/RetroMusicPlayer" "https://github.com/RetroMusicPlayer/RetroMusicPlayer/issues"
} }
} }

View file

@ -18,6 +18,7 @@ import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.TextView import android.widget.TextView
import androidx.core.net.toUri
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.extensions.openUrl import code.name.monkey.retromusic.extensions.openUrl
@ -26,7 +27,7 @@ import code.name.monkey.retromusic.views.RetroShapeableImageView
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
class ContributorAdapter( class ContributorAdapter(
private var contributors: List<Contributor> private var contributors: List<Contributor>,
) : RecyclerView.Adapter<ContributorAdapter.ViewHolder>() { ) : RecyclerView.Adapter<ContributorAdapter.ViewHolder>() {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
@ -86,10 +87,9 @@ class ContributorAdapter(
title.text = contributor.name title.text = contributor.name
text.text = contributor.summary text.text = contributor.summary
Glide.with(image.context) Glide.with(image.context)
.load(contributor.image) .load("file:///android_asset/images/${contributor.image}".toUri())
.error(R.drawable.ic_account) .error(R.drawable.ic_account)
.placeholder(R.drawable.ic_account) .placeholder(R.drawable.ic_account)
.dontAnimate()
.into(image) .into(image)
} }
} }

View file

@ -163,7 +163,7 @@ class HomeAdapter(private val activity: AppCompatActivity) :
val songAdapter = SongAdapter( val songAdapter = SongAdapter(
activity, activity,
home.arrayList as MutableList<Song>, home.arrayList as MutableList<Song>,
R.layout.item_favourite_card, null R.layout.item_favourite_card
) )
layoutManager = linearLayoutManager() layoutManager = linearLayoutManager()
adapter = songAdapter adapter = songAdapter
@ -178,10 +178,10 @@ class HomeAdapter(private val activity: AppCompatActivity) :
} }
private fun artistsAdapter(artists: List<Artist>) = private fun artistsAdapter(artists: List<Artist>) =
ArtistAdapter(activity, artists, PreferenceUtil.homeArtistGridStyle, null, this) ArtistAdapter(activity, artists, PreferenceUtil.homeArtistGridStyle, this)
private fun albumAdapter(albums: List<Album>) = private fun albumAdapter(albums: List<Album>) =
AlbumAdapter(activity, albums, PreferenceUtil.homeAlbumGridStyle, null, this) AlbumAdapter(activity, albums, PreferenceUtil.homeAlbumGridStyle, this)
private fun gridLayoutManager() = private fun gridLayoutManager() =
GridLayoutManager(activity, 1, GridLayoutManager.HORIZONTAL, false) GridLayoutManager(activity, 1, GridLayoutManager.HORIZONTAL, false)

View file

@ -29,7 +29,6 @@ import code.name.monkey.retromusic.extensions.getTintedDrawable
import code.name.monkey.retromusic.glide.GlideApp import code.name.monkey.retromusic.glide.GlideApp
import code.name.monkey.retromusic.glide.RetroGlideExtension import code.name.monkey.retromusic.glide.RetroGlideExtension
import code.name.monkey.retromusic.glide.audiocover.AudioFileCover import code.name.monkey.retromusic.glide.audiocover.AudioFileCover
import code.name.monkey.retromusic.interfaces.ICabHolder
import code.name.monkey.retromusic.interfaces.ICallbacks import code.name.monkey.retromusic.interfaces.ICallbacks
import code.name.monkey.retromusic.util.MusicUtil import code.name.monkey.retromusic.util.MusicUtil
import com.bumptech.glide.load.engine.DiskCacheStrategy import com.bumptech.glide.load.engine.DiskCacheStrategy
@ -44,10 +43,9 @@ class SongFileAdapter(
override val activity: AppCompatActivity, override val activity: AppCompatActivity,
private var dataSet: List<File>, private var dataSet: List<File>,
private val itemLayoutRes: Int, private val itemLayoutRes: Int,
private val iCallbacks: ICallbacks?, private val iCallbacks: ICallbacks?
iCabHolder: ICabHolder?,
) : AbsMultiSelectAdapter<SongFileAdapter.ViewHolder, File>( ) : AbsMultiSelectAdapter<SongFileAdapter.ViewHolder, File>(
activity, iCabHolder, R.menu.menu_media_selection activity, R.menu.menu_media_selection
), PopupTextProvider { ), PopupTextProvider {
init { init {
@ -110,7 +108,7 @@ class SongFileAdapter(
) )
) )
} else { } else {
val error = activity.getTintedDrawable(R.drawable.ic_file_music, iconColor) val error = activity.getTintedDrawable(R.drawable.ic_audio_file, iconColor)
GlideApp.with(activity) GlideApp.with(activity)
.load(AudioFileCover(file.path)) .load(AudioFileCover(file.path))
.diskCacheStrategy(DiskCacheStrategy.NONE) .diskCacheStrategy(DiskCacheStrategy.NONE)

View file

@ -30,7 +30,6 @@ import code.name.monkey.retromusic.glide.RetroMusicColoredTarget
import code.name.monkey.retromusic.helper.SortOrder import code.name.monkey.retromusic.helper.SortOrder
import code.name.monkey.retromusic.helper.menu.SongsMenuHelper import code.name.monkey.retromusic.helper.menu.SongsMenuHelper
import code.name.monkey.retromusic.interfaces.IAlbumClickListener import code.name.monkey.retromusic.interfaces.IAlbumClickListener
import code.name.monkey.retromusic.interfaces.ICabHolder
import code.name.monkey.retromusic.model.Album import code.name.monkey.retromusic.model.Album
import code.name.monkey.retromusic.model.Song import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.util.MusicUtil import code.name.monkey.retromusic.util.MusicUtil
@ -42,11 +41,9 @@ open class AlbumAdapter(
override val activity: FragmentActivity, override val activity: FragmentActivity,
var dataSet: List<Album>, var dataSet: List<Album>,
var itemLayoutRes: Int, var itemLayoutRes: Int,
iCabHolder: ICabHolder?,
val listener: IAlbumClickListener? val listener: IAlbumClickListener?
) : AbsMultiSelectAdapter<AlbumAdapter.ViewHolder, Album>( ) : AbsMultiSelectAdapter<AlbumAdapter.ViewHolder, Album>(
activity, activity,
iCabHolder,
R.menu.menu_media_selection R.menu.menu_media_selection
), PopupTextProvider { ), PopupTextProvider {

View file

@ -22,7 +22,6 @@ import code.name.monkey.retromusic.glide.RetroGlideExtension
import code.name.monkey.retromusic.glide.RetroMusicColoredTarget import code.name.monkey.retromusic.glide.RetroMusicColoredTarget
import code.name.monkey.retromusic.helper.HorizontalAdapterHelper import code.name.monkey.retromusic.helper.HorizontalAdapterHelper
import code.name.monkey.retromusic.interfaces.IAlbumClickListener import code.name.monkey.retromusic.interfaces.IAlbumClickListener
import code.name.monkey.retromusic.interfaces.ICabHolder
import code.name.monkey.retromusic.model.Album import code.name.monkey.retromusic.model.Album
import code.name.monkey.retromusic.util.MusicUtil import code.name.monkey.retromusic.util.MusicUtil
import code.name.monkey.retromusic.util.color.MediaNotificationProcessor import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
@ -30,10 +29,9 @@ import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
class HorizontalAlbumAdapter( class HorizontalAlbumAdapter(
activity: FragmentActivity, activity: FragmentActivity,
dataSet: List<Album>, dataSet: List<Album>,
ICabHolder: ICabHolder?,
albumClickListener: IAlbumClickListener albumClickListener: IAlbumClickListener
) : AlbumAdapter( ) : AlbumAdapter(
activity, dataSet, HorizontalAdapterHelper.LAYOUT_RES, ICabHolder, albumClickListener activity, dataSet, HorizontalAdapterHelper.LAYOUT_RES, albumClickListener
) { ) {
override fun createViewHolder(view: View, viewType: Int): ViewHolder { override fun createViewHolder(view: View, viewType: Int): ViewHolder {

View file

@ -33,7 +33,6 @@ import code.name.monkey.retromusic.glide.RetroMusicColoredTarget
import code.name.monkey.retromusic.helper.menu.SongsMenuHelper import code.name.monkey.retromusic.helper.menu.SongsMenuHelper
import code.name.monkey.retromusic.interfaces.IAlbumArtistClickListener import code.name.monkey.retromusic.interfaces.IAlbumArtistClickListener
import code.name.monkey.retromusic.interfaces.IArtistClickListener import code.name.monkey.retromusic.interfaces.IArtistClickListener
import code.name.monkey.retromusic.interfaces.ICabHolder
import code.name.monkey.retromusic.model.Artist import code.name.monkey.retromusic.model.Artist
import code.name.monkey.retromusic.model.Song import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.util.MusicUtil import code.name.monkey.retromusic.util.MusicUtil
@ -45,12 +44,10 @@ class ArtistAdapter(
override val activity: FragmentActivity, override val activity: FragmentActivity,
var dataSet: List<Artist>, var dataSet: List<Artist>,
var itemLayoutRes: Int, var itemLayoutRes: Int,
val ICabHolder: ICabHolder?,
val IArtistClickListener: IArtistClickListener, val IArtistClickListener: IArtistClickListener,
val IAlbumArtistClickListener: IAlbumArtistClickListener? = null val IAlbumArtistClickListener: IAlbumArtistClickListener? = null
) : AbsMultiSelectAdapter<ArtistAdapter.ViewHolder, Artist>( ) : AbsMultiSelectAdapter<ArtistAdapter.ViewHolder, Artist>(activity, R.menu.menu_media_selection),
activity, ICabHolder, R.menu.menu_media_selection PopupTextProvider {
), PopupTextProvider {
var albumArtistsOnly = false var albumArtistsOnly = false

View file

@ -1,56 +1,58 @@
package code.name.monkey.retromusic.adapter.base package code.name.monkey.retromusic.adapter.base
import android.annotation.SuppressLint
import android.graphics.Color import android.graphics.Color
import android.view.ActionMode
import android.view.Menu import android.view.Menu
import android.view.MenuItem import android.view.MenuItem
import androidx.activity.OnBackPressedCallback
import androidx.annotation.MenuRes import androidx.annotation.MenuRes
import androidx.fragment.app.FragmentActivity import androidx.fragment.app.FragmentActivity
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import code.name.monkey.appthemehelper.util.VersionUtils import code.name.monkey.appthemehelper.util.VersionUtils
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.extensions.surfaceColor import code.name.monkey.retromusic.databinding.NumberRollViewBinding
import code.name.monkey.retromusic.interfaces.ICabCallback import code.name.monkey.retromusic.views.NumberRollView
import code.name.monkey.retromusic.interfaces.ICabHolder
import code.name.monkey.retromusic.util.RetroColorUtil
import com.afollestad.materialcab.attached.AttachedCab
import com.afollestad.materialcab.attached.destroy
import com.afollestad.materialcab.attached.isActive
abstract class AbsMultiSelectAdapter<V : RecyclerView.ViewHolder?, I>( abstract class AbsMultiSelectAdapter<V : RecyclerView.ViewHolder?, I>(
open val activity: FragmentActivity, private val ICabHolder: ICabHolder?, @MenuRes menuRes: Int open val activity: FragmentActivity, @MenuRes menuRes: Int,
) : RecyclerView.Adapter<V>(), ICabCallback { ) : RecyclerView.Adapter<V>(), ActionMode.Callback {
private var cab: AttachedCab? = null var actionMode: ActionMode? = null
private val checked: MutableList<I> private val checked: MutableList<I>
private var menuRes: Int private var menuRes: Int
override fun onCabCreated(cab: AttachedCab, menu: Menu): Boolean {
activity.window.statusBarColor = override fun onCreateActionMode(mode: ActionMode?, menu: Menu?): Boolean {
RetroColorUtil.shiftBackgroundColor(activity.surfaceColor()) val inflater = mode?.menuInflater
inflater?.inflate(menuRes, menu)
return true return true
} }
override fun onCabFinished(cab: AttachedCab): Boolean { override fun onPrepareActionMode(mode: ActionMode?, menu: Menu?): Boolean {
clearChecked() return false
activity.window.statusBarColor = when {
VersionUtils.hasMarshmallow() -> Color.TRANSPARENT
else -> Color.BLACK
}
return true
} }
override fun onCabItemClicked(item: MenuItem): Boolean { override fun onActionItemClicked(mode: ActionMode?, item: MenuItem?): Boolean {
if (item.itemId == R.id.action_multi_select_adapter_check_all) { if (item?.itemId == R.id.action_multi_select_adapter_check_all) {
checkAll() checkAll()
} else { } else {
onMultipleItemAction(item, ArrayList(checked)) onMultipleItemAction(item!!, ArrayList(checked))
cab?.destroy() actionMode?.finish()
clearChecked() clearChecked()
} }
return true return true
} }
override fun onDestroyActionMode(mode: ActionMode?) {
clearChecked()
activity.window.statusBarColor = when {
VersionUtils.hasMarshmallow() -> Color.TRANSPARENT
else -> Color.BLACK
}
actionMode = null
onBackPressedCallback.remove()
}
private fun checkAll() { private fun checkAll() {
if (ICabHolder != null) { if (actionMode != null) {
checked.clear() checked.clear()
for (i in 0 until itemCount) { for (i in 0 until itemCount) {
val identifier = getIdentifier(i) val identifier = getIdentifier(i)
@ -72,7 +74,7 @@ abstract class AbsMultiSelectAdapter<V : RecyclerView.ViewHolder?, I>(
} }
protected val isInQuickSelectMode: Boolean protected val isInQuickSelectMode: Boolean
get() = cab != null && cab!!.isActive() get() = actionMode != null
protected abstract fun onMultipleItemAction(menuItem: MenuItem, selection: List<I>) protected abstract fun onMultipleItemAction(menuItem: MenuItem, selection: List<I>)
protected fun setMultiSelectMenuRes(@MenuRes menuRes: Int) { protected fun setMultiSelectMenuRes(@MenuRes menuRes: Int) {
@ -80,16 +82,13 @@ abstract class AbsMultiSelectAdapter<V : RecyclerView.ViewHolder?, I>(
} }
protected fun toggleChecked(position: Int): Boolean { protected fun toggleChecked(position: Int): Boolean {
if (ICabHolder != null) { val identifier = getIdentifier(position) ?: return false
val identifier = getIdentifier(position) ?: return false if (!checked.remove(identifier)) {
if (!checked.remove(identifier)) { checked.add(identifier)
checked.add(identifier)
}
notifyItemChanged(position)
updateCab()
return true
} }
return false notifyItemChanged(position)
updateCab()
return true
} }
private fun clearChecked() { private fun clearChecked() {
@ -97,23 +96,21 @@ abstract class AbsMultiSelectAdapter<V : RecyclerView.ViewHolder?, I>(
notifyDataSetChanged() notifyDataSetChanged()
} }
@SuppressLint("StringFormatInvalid", "StringFormatMatches")
private fun updateCab() { private fun updateCab() {
if (ICabHolder != null) { if (actionMode == null) {
if (cab == null || !cab!!.isActive()) { actionMode = activity.startActionMode(this)?.apply {
cab = ICabHolder.openCab(menuRes, this) customView = NumberRollViewBinding.inflate(activity.layoutInflater).root
} }
val size = checked.size activity.onBackPressedDispatcher.addCallback(onBackPressedCallback)
when { }
size <= 0 -> { val size = checked.size
cab?.destroy() when {
} size <= 0 -> {
size == 1 -> { actionMode?.finish()
cab?.title(literal = getName(checked[0])) }
} else -> {
else -> { actionMode?.customView?.findViewById<NumberRollView>(R.id.selection_mode_number)
cab?.title(literal = activity.getString(R.string.x_selected, size)) ?.setNumber(size, true)
}
} }
} }
} }
@ -122,4 +119,13 @@ abstract class AbsMultiSelectAdapter<V : RecyclerView.ViewHolder?, I>(
checked = ArrayList() checked = ArrayList()
this.menuRes = menuRes this.menuRes = menuRes
} }
private val onBackPressedCallback = object : OnBackPressedCallback(true) {
override fun handleOnBackPressed() {
if (actionMode != null) {
actionMode?.finish()
remove()
}
}
}
} }

View file

@ -15,6 +15,7 @@
package code.name.monkey.retromusic.adapter.playlist package code.name.monkey.retromusic.adapter.playlist
import android.graphics.Color import android.graphics.Color
import android.graphics.drawable.Drawable
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.MenuItem import android.view.MenuItem
import android.view.View import android.view.View
@ -23,6 +24,8 @@ import androidx.appcompat.widget.PopupMenu
import androidx.core.view.isGone import androidx.core.view.isGone
import androidx.core.view.setPadding import androidx.core.view.setPadding
import androidx.fragment.app.FragmentActivity import androidx.fragment.app.FragmentActivity
import code.name.monkey.appthemehelper.util.ATHUtil
import code.name.monkey.appthemehelper.util.TintHelper
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.adapter.base.AbsMultiSelectAdapter import code.name.monkey.retromusic.adapter.base.AbsMultiSelectAdapter
import code.name.monkey.retromusic.adapter.base.MediaEntryViewHolder import code.name.monkey.retromusic.adapter.base.MediaEntryViewHolder
@ -35,7 +38,6 @@ import code.name.monkey.retromusic.glide.playlistPreview.PlaylistPreview
import code.name.monkey.retromusic.helper.SortOrder.PlaylistSortOrder import code.name.monkey.retromusic.helper.SortOrder.PlaylistSortOrder
import code.name.monkey.retromusic.helper.menu.PlaylistMenuHelper import code.name.monkey.retromusic.helper.menu.PlaylistMenuHelper
import code.name.monkey.retromusic.helper.menu.SongsMenuHelper import code.name.monkey.retromusic.helper.menu.SongsMenuHelper
import code.name.monkey.retromusic.interfaces.ICabHolder
import code.name.monkey.retromusic.interfaces.IPlaylistClickListener import code.name.monkey.retromusic.interfaces.IPlaylistClickListener
import code.name.monkey.retromusic.model.Song import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.util.MusicUtil import code.name.monkey.retromusic.util.MusicUtil
@ -46,11 +48,9 @@ class PlaylistAdapter(
override val activity: FragmentActivity, override val activity: FragmentActivity,
var dataSet: List<PlaylistWithSongs>, var dataSet: List<PlaylistWithSongs>,
private var itemLayoutRes: Int, private var itemLayoutRes: Int,
ICabHolder: ICabHolder?,
private val listener: IPlaylistClickListener private val listener: IPlaylistClickListener
) : AbsMultiSelectAdapter<PlaylistAdapter.ViewHolder, PlaylistWithSongs>( ) : AbsMultiSelectAdapter<PlaylistAdapter.ViewHolder, PlaylistWithSongs>(
activity, activity,
ICabHolder,
R.menu.menu_playlists_selection R.menu.menu_playlists_selection
), PopupTextProvider { ), PopupTextProvider {
@ -72,7 +72,7 @@ class PlaylistAdapter(
return createViewHolder(view) return createViewHolder(view)
} }
fun createViewHolder(view: View): ViewHolder { private fun createViewHolder(view: View): ViewHolder {
return ViewHolder(view) return ViewHolder(view)
} }
@ -101,17 +101,25 @@ class PlaylistAdapter(
holder.title?.text = getPlaylistTitle(playlist.playlistEntity) holder.title?.text = getPlaylistTitle(playlist.playlistEntity)
holder.text?.text = getPlaylistText(playlist) holder.text?.text = getPlaylistText(playlist)
holder.menu?.isGone = isChecked(playlist) holder.menu?.isGone = isChecked(playlist)
GlideApp.with(activity) if (itemLayoutRes == R.layout.item_list) {
.load( holder.image?.setPadding(activity.dipToPix(8F).toInt())
if (itemLayoutRes == R.layout.item_list) { holder.image?.setImageDrawable(getIconRes())
holder.image?.setPadding(activity.dipToPix(8F).toInt()) } else {
R.drawable.ic_playlist_play GlideApp.with(activity)
} else PlaylistPreview(playlist) .load(
) PlaylistPreview(playlist)
.playlistOptions() )
.into(holder.image!!) .playlistOptions()
.into(holder.image!!)
}
} }
private fun getIconRes(): Drawable = TintHelper.createTintedDrawable(
activity,
R.drawable.ic_playlist_play,
ATHUtil.resolveColor(activity, android.R.attr.colorControlNormal)
)
override fun getItemCount(): Int { override fun getItemCount(): Int {
return dataSet.size return dataSet.size
} }

View file

@ -21,15 +21,13 @@ import androidx.annotation.LayoutRes
import androidx.fragment.app.FragmentActivity import androidx.fragment.app.FragmentActivity
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.helper.MusicPlayerRemote import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.interfaces.ICabHolder
import code.name.monkey.retromusic.model.Song import code.name.monkey.retromusic.model.Song
abstract class AbsOffsetSongAdapter( abstract class AbsOffsetSongAdapter(
activity: FragmentActivity, activity: FragmentActivity,
dataSet: MutableList<Song>, dataSet: MutableList<Song>,
@LayoutRes itemLayoutRes: Int, @LayoutRes itemLayoutRes: Int
ICabHolder: ICabHolder? ) : SongAdapter(activity, dataSet, itemLayoutRes) {
) : SongAdapter(activity, dataSet, itemLayoutRes, ICabHolder) {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): SongAdapter.ViewHolder { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): SongAdapter.ViewHolder {
if (viewType == OFFSET_ITEM) { if (viewType == OFFSET_ITEM) {

View file

@ -28,7 +28,6 @@ import code.name.monkey.retromusic.extensions.accentColor
import code.name.monkey.retromusic.extensions.accentOutlineColor import code.name.monkey.retromusic.extensions.accentOutlineColor
import code.name.monkey.retromusic.fragments.LibraryViewModel import code.name.monkey.retromusic.fragments.LibraryViewModel
import code.name.monkey.retromusic.helper.MusicPlayerRemote import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.interfaces.ICabHolder
import code.name.monkey.retromusic.model.Song import code.name.monkey.retromusic.model.Song
import com.google.android.material.button.MaterialButton import com.google.android.material.button.MaterialButton
import com.h6ah4i.android.widget.advrecyclerview.draggable.DraggableItemAdapter import com.h6ah4i.android.widget.advrecyclerview.draggable.DraggableItemAdapter
@ -42,8 +41,7 @@ class OrderablePlaylistSongAdapter(
activity: FragmentActivity, activity: FragmentActivity,
dataSet: MutableList<Song>, dataSet: MutableList<Song>,
itemLayoutRes: Int, itemLayoutRes: Int,
ICabHolder: ICabHolder?, ) : AbsOffsetSongAdapter(activity, dataSet, itemLayoutRes),
) : AbsOffsetSongAdapter(activity, dataSet, itemLayoutRes, ICabHolder),
DraggableItemAdapter<OrderablePlaylistSongAdapter.ViewHolder> { DraggableItemAdapter<OrderablePlaylistSongAdapter.ViewHolder> {
val libraryViewModel: LibraryViewModel by activity.viewModel() val libraryViewModel: LibraryViewModel by activity.viewModel()

View file

@ -43,9 +43,8 @@ class PlayingQueueAdapter(
dataSet: MutableList<Song>, dataSet: MutableList<Song>,
private var current: Int, private var current: Int,
itemLayoutRes: Int, itemLayoutRes: Int,
) : SongAdapter( ) : SongAdapter(activity, dataSet, itemLayoutRes),
activity, dataSet, itemLayoutRes, null DraggableItemAdapter<PlayingQueueAdapter.ViewHolder>,
), DraggableItemAdapter<PlayingQueueAdapter.ViewHolder>,
SwipeableItemAdapter<PlayingQueueAdapter.ViewHolder>, SwipeableItemAdapter<PlayingQueueAdapter.ViewHolder>,
PopupTextProvider { PopupTextProvider {

View file

@ -21,7 +21,6 @@ import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.extensions.accentColor import code.name.monkey.retromusic.extensions.accentColor
import code.name.monkey.retromusic.extensions.accentOutlineColor import code.name.monkey.retromusic.extensions.accentOutlineColor
import code.name.monkey.retromusic.helper.MusicPlayerRemote import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.interfaces.ICabHolder
import code.name.monkey.retromusic.model.Song import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.util.PreferenceUtil import code.name.monkey.retromusic.util.PreferenceUtil
import code.name.monkey.retromusic.util.RetroUtil import code.name.monkey.retromusic.util.RetroUtil
@ -30,9 +29,8 @@ import com.google.android.material.button.MaterialButton
class ShuffleButtonSongAdapter( class ShuffleButtonSongAdapter(
activity: FragmentActivity, activity: FragmentActivity,
dataSet: MutableList<Song>, dataSet: MutableList<Song>,
itemLayoutRes: Int, itemLayoutRes: Int
ICabHolder: ICabHolder? ) : AbsOffsetSongAdapter(activity, dataSet, itemLayoutRes) {
) : AbsOffsetSongAdapter(activity, dataSet, itemLayoutRes, ICabHolder) {
override fun createViewHolder(view: View): SongAdapter.ViewHolder { override fun createViewHolder(view: View): SongAdapter.ViewHolder {

View file

@ -17,16 +17,14 @@ package code.name.monkey.retromusic.adapter.song
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.ViewGroup import android.view.ViewGroup
import androidx.fragment.app.FragmentActivity import androidx.fragment.app.FragmentActivity
import code.name.monkey.retromusic.interfaces.ICabHolder
import code.name.monkey.retromusic.model.Song import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.util.MusicUtil import code.name.monkey.retromusic.util.MusicUtil
class SimpleSongAdapter( class SimpleSongAdapter(
context: FragmentActivity, context: FragmentActivity,
songs: ArrayList<Song>, songs: ArrayList<Song>,
layoutRes: Int, layoutRes: Int
ICabHolder: ICabHolder? ) : SongAdapter(context, songs, layoutRes) {
) : SongAdapter(context, songs, layoutRes, ICabHolder) {
override fun swapDataSet(dataSet: List<Song>) { override fun swapDataSet(dataSet: List<Song>) {
this.dataSet = dataSet.toMutableList() this.dataSet = dataSet.toMutableList()

View file

@ -36,8 +36,6 @@ import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.helper.SortOrder import code.name.monkey.retromusic.helper.SortOrder
import code.name.monkey.retromusic.helper.menu.SongMenuHelper import code.name.monkey.retromusic.helper.menu.SongMenuHelper
import code.name.monkey.retromusic.helper.menu.SongsMenuHelper import code.name.monkey.retromusic.helper.menu.SongsMenuHelper
import code.name.monkey.retromusic.interfaces.ICabCallback
import code.name.monkey.retromusic.interfaces.ICabHolder
import code.name.monkey.retromusic.model.Song import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.util.MusicUtil import code.name.monkey.retromusic.util.MusicUtil
import code.name.monkey.retromusic.util.PreferenceUtil import code.name.monkey.retromusic.util.PreferenceUtil
@ -53,13 +51,11 @@ open class SongAdapter(
override val activity: FragmentActivity, override val activity: FragmentActivity,
var dataSet: MutableList<Song>, var dataSet: MutableList<Song>,
protected var itemLayoutRes: Int, protected var itemLayoutRes: Int,
ICabHolder: ICabHolder?,
showSectionName: Boolean = true showSectionName: Boolean = true
) : AbsMultiSelectAdapter<SongAdapter.ViewHolder, Song>( ) : AbsMultiSelectAdapter<SongAdapter.ViewHolder, Song>(
activity, activity,
ICabHolder,
R.menu.menu_media_selection R.menu.menu_media_selection
), ICabCallback, PopupTextProvider { ), PopupTextProvider {
private var showSectionName = true private var showSectionName = true
@ -217,6 +213,7 @@ open class SongAdapter(
} }
override fun onLongClick(v: View?): Boolean { override fun onLongClick(v: View?): Boolean {
println("Long click")
return toggleChecked(layoutPosition) return toggleChecked(layoutPosition)
} }
} }

View file

@ -14,7 +14,6 @@
*/ */
package code.name.monkey.retromusic.extensions package code.name.monkey.retromusic.extensions
import android.R
import android.animation.Animator import android.animation.Animator
import android.animation.ObjectAnimator import android.animation.ObjectAnimator
import android.animation.ValueAnimator import android.animation.ValueAnimator
@ -72,7 +71,7 @@ fun EditText.appHandleColor(): EditText {
fun NavigationBarView.setItemColors(@ColorInt normalColor: Int, @ColorInt selectedColor: Int) { fun NavigationBarView.setItemColors(@ColorInt normalColor: Int, @ColorInt selectedColor: Int) {
val csl = ColorStateList( val csl = ColorStateList(
arrayOf(intArrayOf(-R.attr.state_checked), intArrayOf(R.attr.state_checked)), arrayOf(intArrayOf(-android.R.attr.state_checked), intArrayOf(android.R.attr.state_checked)),
intArrayOf(normalColor, selectedColor) intArrayOf(normalColor, selectedColor)
) )
itemIconTintList = csl itemIconTintList = csl

View file

@ -19,7 +19,6 @@ import android.content.Intent
import android.graphics.Color import android.graphics.Color
import android.os.Bundle import android.os.Bundle
import android.view.* import android.view.*
import androidx.activity.addCallback
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import androidx.core.os.bundleOf import androidx.core.os.bundleOf
import androidx.core.text.parseAsHtml import androidx.core.text.parseAsHtml
@ -31,7 +30,6 @@ import androidx.navigation.fragment.navArgs
import androidx.recyclerview.widget.DefaultItemAnimator import androidx.recyclerview.widget.DefaultItemAnimator
import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import androidx.transition.Fade
import code.name.monkey.appthemehelper.common.ATHToolbarActivity.getToolbarBackgroundColor import code.name.monkey.appthemehelper.common.ATHToolbarActivity.getToolbarBackgroundColor
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
import code.name.monkey.retromusic.EXTRA_ALBUM_ID import code.name.monkey.retromusic.EXTRA_ALBUM_ID
@ -56,18 +54,12 @@ import code.name.monkey.retromusic.helper.SortOrder.AlbumSongSortOrder.Companion
import code.name.monkey.retromusic.helper.SortOrder.AlbumSongSortOrder.Companion.SONG_TRACK_LIST import code.name.monkey.retromusic.helper.SortOrder.AlbumSongSortOrder.Companion.SONG_TRACK_LIST
import code.name.monkey.retromusic.helper.SortOrder.AlbumSongSortOrder.Companion.SONG_Z_A import code.name.monkey.retromusic.helper.SortOrder.AlbumSongSortOrder.Companion.SONG_Z_A
import code.name.monkey.retromusic.interfaces.IAlbumClickListener import code.name.monkey.retromusic.interfaces.IAlbumClickListener
import code.name.monkey.retromusic.interfaces.ICabCallback
import code.name.monkey.retromusic.interfaces.ICabHolder
import code.name.monkey.retromusic.model.Album import code.name.monkey.retromusic.model.Album
import code.name.monkey.retromusic.model.Artist import code.name.monkey.retromusic.model.Artist
import code.name.monkey.retromusic.network.Result import code.name.monkey.retromusic.network.Result
import code.name.monkey.retromusic.network.model.LastFmAlbum import code.name.monkey.retromusic.network.model.LastFmAlbum
import code.name.monkey.retromusic.repository.RealRepository import code.name.monkey.retromusic.repository.RealRepository
import code.name.monkey.retromusic.util.* import code.name.monkey.retromusic.util.*
import com.afollestad.materialcab.attached.AttachedCab
import com.afollestad.materialcab.attached.destroy
import com.afollestad.materialcab.attached.isActive
import com.afollestad.materialcab.createCab
import com.google.android.material.shape.MaterialShapeDrawable import com.google.android.material.shape.MaterialShapeDrawable
import com.google.android.material.transition.MaterialArcMotion import com.google.android.material.transition.MaterialArcMotion
import com.google.android.material.transition.MaterialContainerTransform import com.google.android.material.transition.MaterialContainerTransform
@ -80,7 +72,7 @@ import org.koin.core.parameter.parametersOf
import java.text.Collator import java.text.Collator
class AlbumDetailsFragment : AbsMainActivityFragment(R.layout.fragment_album_details), class AlbumDetailsFragment : AbsMainActivityFragment(R.layout.fragment_album_details),
IAlbumClickListener, ICabHolder { IAlbumClickListener {
private var _binding: FragmentAlbumDetailsBinding? = null private var _binding: FragmentAlbumDetailsBinding? = null
private val binding get() = _binding!! private val binding get() = _binding!!
@ -110,20 +102,18 @@ class AlbumDetailsFragment : AbsMainActivityFragment(R.layout.fragment_album_det
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
_binding = FragmentAlbumDetailsBinding.bind(view) _binding = FragmentAlbumDetailsBinding.bind(view)
enterTransition = Fade()
exitTransition = Fade()
mainActivity.addMusicServiceEventListener(detailsViewModel) mainActivity.addMusicServiceEventListener(detailsViewModel)
mainActivity.setSupportActionBar(binding.toolbar) mainActivity.setSupportActionBar(binding.toolbar)
binding.toolbar.title = " " binding.toolbar.title = " "
binding.albumCoverContainer.transitionName = arguments.extraAlbumId.toString() binding.albumCoverContainer.transitionName = arguments.extraAlbumId.toString()
postponeEnterTransition() postponeEnterTransition()
detailsViewModel.getAlbum().observe(viewLifecycleOwner) { detailsViewModel.getAlbum().observe(viewLifecycleOwner) { album ->
view.doOnPreDraw { view.doOnPreDraw {
startPostponedEnterTransition() startPostponedEnterTransition()
} }
albumArtistExists = !it.albumArtist.isNullOrEmpty() albumArtistExists = !album.albumArtist.isNullOrEmpty()
showAlbum(it) showAlbum(album)
binding.artistImage.transitionName = if (albumArtistExists) { binding.artistImage.transitionName = if (albumArtistExists) {
album.albumArtist album.albumArtist
} else { } else {
@ -170,12 +160,6 @@ class AlbumDetailsFragment : AbsMainActivityFragment(R.layout.fragment_album_det
} }
} }
requireActivity().onBackPressedDispatcher.addCallback(viewLifecycleOwner) {
if (!handleBackPress()) {
remove()
requireActivity().onBackPressed()
}
}
binding.appBarLayout?.statusBarForeground = binding.appBarLayout?.statusBarForeground =
MaterialShapeDrawable.createWithElevationOverlay(requireContext()) MaterialShapeDrawable.createWithElevationOverlay(requireContext())
} }
@ -189,8 +173,7 @@ class AlbumDetailsFragment : AbsMainActivityFragment(R.layout.fragment_album_det
simpleSongAdapter = SimpleSongAdapter( simpleSongAdapter = SimpleSongAdapter(
requireActivity() as AppCompatActivity, requireActivity() as AppCompatActivity,
ArrayList(), ArrayList(),
R.layout.item_song, R.layout.item_song
this
) )
binding.fragmentAlbumContent.recyclerView.apply { binding.fragmentAlbumContent.recyclerView.apply {
layoutManager = LinearLayoutManager(requireContext()) layoutManager = LinearLayoutManager(requireContext())
@ -264,7 +247,7 @@ class AlbumDetailsFragment : AbsMainActivityFragment(R.layout.fragment_album_det
String.format(getString(R.string.label_more_from), album.artistName) String.format(getString(R.string.label_more_from), album.artistName)
val albumAdapter = val albumAdapter =
HorizontalAlbumAdapter(requireActivity() as AppCompatActivity, albums, this, this) HorizontalAlbumAdapter(requireActivity() as AppCompatActivity, albums, this)
binding.fragmentAlbumContent.moreRecyclerView.layoutManager = GridLayoutManager( binding.fragmentAlbumContent.moreRecyclerView.layoutManager = GridLayoutManager(
requireContext(), requireContext(),
1, 1,
@ -452,38 +435,6 @@ class AlbumDetailsFragment : AbsMainActivityFragment(R.layout.fragment_album_det
simpleSongAdapter.swapDataSet(album.songs) simpleSongAdapter.swapDataSet(album.songs)
} }
private fun handleBackPress(): Boolean {
cab?.let {
if (it.isActive()) {
it.destroy()
return true
}
}
return false
}
private var cab: AttachedCab? = null
override fun openCab(menuRes: Int, callback: ICabCallback): AttachedCab {
cab?.let {
if (it.isActive()) {
it.destroy()
}
}
cab = createCab(R.id.toolbar_container) {
menu(menuRes)
closeDrawable(R.drawable.ic_close)
backgroundColor(literal = RetroColorUtil.shiftBackgroundColor(surfaceColor()))
slideDown()
onCreate { cab, menu -> callback.onCabCreated(cab, menu) }
onSelection {
callback.onCabItemClicked(it)
}
onDestroy { callback.onCabFinished(it) }
}
return cab as AttachedCab
}
override fun onDestroyView() { override fun onDestroyView() {
super.onDestroyView() super.onDestroyView()
_binding = null _binding = null

View file

@ -16,7 +16,6 @@ package code.name.monkey.retromusic.fragments.albums
import android.os.Bundle import android.os.Bundle
import android.view.* import android.view.*
import androidx.activity.addCallback
import androidx.core.os.bundleOf import androidx.core.os.bundleOf
import androidx.navigation.fragment.FragmentNavigatorExtras import androidx.navigation.fragment.FragmentNavigatorExtras
import androidx.navigation.fragment.findNavController import androidx.navigation.fragment.findNavController
@ -25,26 +24,18 @@ import code.name.monkey.retromusic.EXTRA_ALBUM_ID
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.adapter.album.AlbumAdapter import code.name.monkey.retromusic.adapter.album.AlbumAdapter
import code.name.monkey.retromusic.extensions.setUpMediaRouteButton import code.name.monkey.retromusic.extensions.setUpMediaRouteButton
import code.name.monkey.retromusic.extensions.surfaceColor
import code.name.monkey.retromusic.fragments.GridStyle import code.name.monkey.retromusic.fragments.GridStyle
import code.name.monkey.retromusic.fragments.ReloadType import code.name.monkey.retromusic.fragments.ReloadType
import code.name.monkey.retromusic.fragments.base.AbsRecyclerViewCustomGridSizeFragment import code.name.monkey.retromusic.fragments.base.AbsRecyclerViewCustomGridSizeFragment
import code.name.monkey.retromusic.helper.MusicPlayerRemote import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.helper.SortOrder.AlbumSortOrder import code.name.monkey.retromusic.helper.SortOrder.AlbumSortOrder
import code.name.monkey.retromusic.interfaces.IAlbumClickListener import code.name.monkey.retromusic.interfaces.IAlbumClickListener
import code.name.monkey.retromusic.interfaces.ICabCallback
import code.name.monkey.retromusic.interfaces.ICabHolder
import code.name.monkey.retromusic.service.MusicService import code.name.monkey.retromusic.service.MusicService
import code.name.monkey.retromusic.util.PreferenceUtil import code.name.monkey.retromusic.util.PreferenceUtil
import code.name.monkey.retromusic.util.RetroColorUtil
import code.name.monkey.retromusic.util.RetroUtil import code.name.monkey.retromusic.util.RetroUtil
import com.afollestad.materialcab.attached.AttachedCab
import com.afollestad.materialcab.attached.destroy
import com.afollestad.materialcab.attached.isActive
import com.afollestad.materialcab.createCab
class AlbumsFragment : AbsRecyclerViewCustomGridSizeFragment<AlbumAdapter, GridLayoutManager>(), class AlbumsFragment : AbsRecyclerViewCustomGridSizeFragment<AlbumAdapter, GridLayoutManager>(),
IAlbumClickListener, ICabHolder { IAlbumClickListener {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
@ -54,12 +45,6 @@ class AlbumsFragment : AbsRecyclerViewCustomGridSizeFragment<AlbumAdapter, GridL
else else
adapter?.swapDataSet(listOf()) adapter?.swapDataSet(listOf())
} }
requireActivity().onBackPressedDispatcher.addCallback(viewLifecycleOwner) {
if (!handleBackPress()) {
remove()
requireActivity().onBackPressed()
}
}
} }
override val titleRes: Int override val titleRes: Int
@ -92,7 +77,6 @@ class AlbumsFragment : AbsRecyclerViewCustomGridSizeFragment<AlbumAdapter, GridL
requireActivity(), requireActivity(),
dataSet, dataSet,
itemLayoutRes(), itemLayoutRes(),
this,
this this
) )
} }
@ -348,40 +332,6 @@ class AlbumsFragment : AbsRecyclerViewCustomGridSizeFragment<AlbumAdapter, GridL
override fun onPause() { override fun onPause() {
super.onPause() super.onPause()
if (cab.isActive()) { adapter?.actionMode?.finish()
cab.destroy()
}
}
private fun handleBackPress(): Boolean {
cab?.let {
if (it.isActive()) {
it.destroy()
return true
}
}
return false
}
private var cab: AttachedCab? = null
override fun openCab(menuRes: Int, callback: ICabCallback): AttachedCab {
cab?.let {
if (it.isActive()) {
it.destroy()
}
}
cab = createCab(R.id.toolbar_container) {
menu(menuRes)
closeDrawable(R.drawable.ic_close)
backgroundColor(literal = RetroColorUtil.shiftBackgroundColor(surfaceColor()))
slideDown()
onCreate { cab, menu -> callback.onCabCreated(cab, menu) }
onSelection {
callback.onCabItemClicked(it)
}
onDestroy { callback.onCabFinished(it) }
}
return cab as AttachedCab
} }
} }

View file

@ -9,7 +9,6 @@ import android.view.Menu
import android.view.MenuInflater import android.view.MenuInflater
import android.view.MenuItem import android.view.MenuItem
import android.view.View import android.view.View
import androidx.activity.addCallback
import androidx.activity.result.contract.ActivityResultContracts import androidx.activity.result.contract.ActivityResultContracts
import androidx.appcompat.widget.PopupMenu import androidx.appcompat.widget.PopupMenu
import androidx.core.os.bundleOf import androidx.core.os.bundleOf
@ -22,7 +21,6 @@ import androidx.navigation.fragment.findNavController
import androidx.recyclerview.widget.DefaultItemAnimator import androidx.recyclerview.widget.DefaultItemAnimator
import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import androidx.transition.Fade
import code.name.monkey.retromusic.EXTRA_ALBUM_ID import code.name.monkey.retromusic.EXTRA_ALBUM_ID
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.adapter.album.HorizontalAlbumAdapter import code.name.monkey.retromusic.adapter.album.HorizontalAlbumAdapter
@ -37,17 +35,11 @@ import code.name.monkey.retromusic.glide.SingleColorTarget
import code.name.monkey.retromusic.helper.MusicPlayerRemote import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.helper.SortOrder import code.name.monkey.retromusic.helper.SortOrder
import code.name.monkey.retromusic.interfaces.IAlbumClickListener import code.name.monkey.retromusic.interfaces.IAlbumClickListener
import code.name.monkey.retromusic.interfaces.ICabCallback
import code.name.monkey.retromusic.interfaces.ICabHolder
import code.name.monkey.retromusic.model.Artist import code.name.monkey.retromusic.model.Artist
import code.name.monkey.retromusic.network.Result import code.name.monkey.retromusic.network.Result
import code.name.monkey.retromusic.network.model.LastFmArtist import code.name.monkey.retromusic.network.model.LastFmArtist
import code.name.monkey.retromusic.repository.RealRepository import code.name.monkey.retromusic.repository.RealRepository
import code.name.monkey.retromusic.util.* import code.name.monkey.retromusic.util.*
import com.afollestad.materialcab.attached.AttachedCab
import com.afollestad.materialcab.attached.destroy
import com.afollestad.materialcab.attached.isActive
import com.afollestad.materialcab.createCab
import com.google.android.material.shape.MaterialShapeDrawable import com.google.android.material.shape.MaterialShapeDrawable
import com.google.android.material.transition.MaterialContainerTransform import com.google.android.material.transition.MaterialContainerTransform
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
@ -57,7 +49,7 @@ import org.koin.android.ext.android.get
import java.util.* import java.util.*
abstract class AbsArtistDetailsFragment : AbsMainActivityFragment(R.layout.fragment_artist_details), abstract class AbsArtistDetailsFragment : AbsMainActivityFragment(R.layout.fragment_artist_details),
IAlbumClickListener, ICabHolder { IAlbumClickListener {
private var _binding: FragmentArtistDetailsBinding? = null private var _binding: FragmentArtistDetailsBinding? = null
private val binding get() = _binding!! private val binding get() = _binding!!
@ -86,8 +78,6 @@ abstract class AbsArtistDetailsFragment : AbsMainActivityFragment(R.layout.fragm
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
_binding = FragmentArtistDetailsBinding.bind(view) _binding = FragmentArtistDetailsBinding.bind(view)
enterTransition = Fade()
exitTransition = Fade()
mainActivity.addMusicServiceEventListener(detailsViewModel) mainActivity.addMusicServiceEventListener(detailsViewModel)
mainActivity.setSupportActionBar(binding.toolbar) mainActivity.setSupportActionBar(binding.toolbar)
binding.toolbar.title = null binding.toolbar.title = null
@ -115,26 +105,19 @@ abstract class AbsArtistDetailsFragment : AbsMainActivityFragment(R.layout.fragm
binding.fragmentArtistContent.biographyText.maxLines = 4 binding.fragmentArtistContent.biographyText.maxLines = 4
} }
} }
requireActivity().onBackPressedDispatcher.addCallback(viewLifecycleOwner) {
if (!handleBackPress()) {
remove()
requireActivity().onBackPressed()
}
}
setupSongSortButton() setupSongSortButton()
binding.appBarLayout?.statusBarForeground = binding.appBarLayout?.statusBarForeground =
MaterialShapeDrawable.createWithElevationOverlay(requireContext()) MaterialShapeDrawable.createWithElevationOverlay(requireContext())
} }
private fun setupRecyclerView() { private fun setupRecyclerView() {
albumAdapter = HorizontalAlbumAdapter(requireActivity(), ArrayList(), this, this) albumAdapter = HorizontalAlbumAdapter(requireActivity(), ArrayList(), this)
binding.fragmentArtistContent.albumRecyclerView.apply { binding.fragmentArtistContent.albumRecyclerView.apply {
itemAnimator = DefaultItemAnimator() itemAnimator = DefaultItemAnimator()
layoutManager = GridLayoutManager(this.context, 1, GridLayoutManager.HORIZONTAL, false) layoutManager = GridLayoutManager(this.context, 1, GridLayoutManager.HORIZONTAL, false)
adapter = albumAdapter adapter = albumAdapter
} }
songAdapter = SimpleSongAdapter(requireActivity(), ArrayList(), R.layout.item_song, this) songAdapter = SimpleSongAdapter(requireActivity(), ArrayList(), R.layout.item_song)
binding.fragmentArtistContent.recyclerView.apply { binding.fragmentArtistContent.recyclerView.apply {
itemAnimator = DefaultItemAnimator() itemAnimator = DefaultItemAnimator()
layoutManager = LinearLayoutManager(this.context) layoutManager = LinearLayoutManager(this.context)
@ -277,8 +260,12 @@ abstract class AbsArtistDetailsFragment : AbsMainActivityFragment(R.layout.fragm
R.id.action_set_artist_image -> { R.id.action_set_artist_image -> {
val intent = Intent(Intent.ACTION_GET_CONTENT) val intent = Intent(Intent.ACTION_GET_CONTENT)
intent.type = "image/*" intent.type = "image/*"
selectImageLauncher.launch(Intent.createChooser(intent, selectImageLauncher.launch(
getString(R.string.pick_from_local_storage))) Intent.createChooser(
intent,
getString(R.string.pick_from_local_storage)
)
)
return true return true
} }
R.id.action_reset_artist_image -> { R.id.action_reset_artist_image -> {
@ -359,40 +346,6 @@ abstract class AbsArtistDetailsFragment : AbsMainActivityFragment(R.layout.fragm
inflater.inflate(R.menu.menu_artist_detail, menu) inflater.inflate(R.menu.menu_artist_detail, menu)
} }
private fun handleBackPress(): Boolean {
cab?.let {
if (it.isActive()) {
it.destroy()
return true
}
}
return false
}
private var cab: AttachedCab? = null
override fun openCab(menuRes: Int, callback: ICabCallback): AttachedCab {
cab?.let {
if (it.isActive()) {
it.destroy()
}
}
cab = createCab(R.id.toolbar_container) {
menu(menuRes)
closeDrawable(R.drawable.ic_close)
backgroundColor(literal = RetroColorUtil.shiftBackgroundColor(surfaceColor()))
slideDown()
onCreate { cab, menu -> callback.onCabCreated(cab, menu) }
onSelection {
callback.onCabItemClicked(it)
}
onDestroy { callback.onCabFinished(it) }
}
return cab as AttachedCab
}
override fun onDestroyView() { override fun onDestroyView() {
super.onDestroyView() super.onDestroyView()
_binding = null _binding = null

View file

@ -16,7 +16,6 @@ package code.name.monkey.retromusic.fragments.artists
import android.os.Bundle import android.os.Bundle
import android.view.* import android.view.*
import androidx.activity.addCallback
import androidx.core.os.bundleOf import androidx.core.os.bundleOf
import androidx.navigation.fragment.FragmentNavigatorExtras import androidx.navigation.fragment.FragmentNavigatorExtras
import androidx.navigation.fragment.findNavController import androidx.navigation.fragment.findNavController
@ -26,7 +25,6 @@ import code.name.monkey.retromusic.EXTRA_ARTIST_NAME
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.adapter.artist.ArtistAdapter import code.name.monkey.retromusic.adapter.artist.ArtistAdapter
import code.name.monkey.retromusic.extensions.setUpMediaRouteButton import code.name.monkey.retromusic.extensions.setUpMediaRouteButton
import code.name.monkey.retromusic.extensions.surfaceColor
import code.name.monkey.retromusic.fragments.GridStyle import code.name.monkey.retromusic.fragments.GridStyle
import code.name.monkey.retromusic.fragments.ReloadType import code.name.monkey.retromusic.fragments.ReloadType
import code.name.monkey.retromusic.fragments.base.AbsRecyclerViewCustomGridSizeFragment import code.name.monkey.retromusic.fragments.base.AbsRecyclerViewCustomGridSizeFragment
@ -34,19 +32,12 @@ import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.helper.SortOrder.ArtistSortOrder import code.name.monkey.retromusic.helper.SortOrder.ArtistSortOrder
import code.name.monkey.retromusic.interfaces.IAlbumArtistClickListener import code.name.monkey.retromusic.interfaces.IAlbumArtistClickListener
import code.name.monkey.retromusic.interfaces.IArtistClickListener import code.name.monkey.retromusic.interfaces.IArtistClickListener
import code.name.monkey.retromusic.interfaces.ICabCallback
import code.name.monkey.retromusic.interfaces.ICabHolder
import code.name.monkey.retromusic.service.MusicService import code.name.monkey.retromusic.service.MusicService
import code.name.monkey.retromusic.util.PreferenceUtil import code.name.monkey.retromusic.util.PreferenceUtil
import code.name.monkey.retromusic.util.RetroColorUtil
import code.name.monkey.retromusic.util.RetroUtil import code.name.monkey.retromusic.util.RetroUtil
import com.afollestad.materialcab.attached.AttachedCab
import com.afollestad.materialcab.attached.destroy
import com.afollestad.materialcab.attached.isActive
import com.afollestad.materialcab.createCab
class ArtistsFragment : AbsRecyclerViewCustomGridSizeFragment<ArtistAdapter, GridLayoutManager>(), class ArtistsFragment : AbsRecyclerViewCustomGridSizeFragment<ArtistAdapter, GridLayoutManager>(),
IArtistClickListener, IAlbumArtistClickListener, ICabHolder { IArtistClickListener, IAlbumArtistClickListener {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
libraryViewModel.getArtists().observe(viewLifecycleOwner) { libraryViewModel.getArtists().observe(viewLifecycleOwner) {
@ -55,12 +46,6 @@ class ArtistsFragment : AbsRecyclerViewCustomGridSizeFragment<ArtistAdapter, Gri
else else
adapter?.swapDataSet(listOf()) adapter?.swapDataSet(listOf())
} }
requireActivity().onBackPressedDispatcher.addCallback(viewLifecycleOwner) {
if (!handleBackPress()) {
remove()
requireActivity().onBackPressed()
}
}
} }
override val titleRes: Int override val titleRes: Int
@ -98,7 +83,7 @@ class ArtistsFragment : AbsRecyclerViewCustomGridSizeFragment<ArtistAdapter, Gri
dataSet, dataSet,
itemLayoutRes(), itemLayoutRes(),
this, this,
this, this this
) )
} }
@ -346,47 +331,8 @@ class ArtistsFragment : AbsRecyclerViewCustomGridSizeFragment<ArtistAdapter, Gri
return false return false
} }
private fun handleBackPress(): Boolean {
cab?.let {
if (it.isActive()) {
it.destroy()
return true
}
}
return false
}
private var cab: AttachedCab? = null
override fun openCab(menuRes: Int, callback: ICabCallback): AttachedCab {
cab?.let {
if (it.isActive()) {
it.destroy()
}
}
cab = createCab(R.id.toolbar_container) {
menu(menuRes)
closeDrawable(R.drawable.ic_close)
backgroundColor(literal = RetroColorUtil.shiftBackgroundColor(surfaceColor()))
slideDown()
onCreate { cab, menu -> callback.onCabCreated(cab, menu) }
onSelection {
callback.onCabItemClicked(it)
}
onDestroy { callback.onCabFinished(it) }
}
return cab as AttachedCab
}
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
libraryViewModel.forceReload(ReloadType.Artists) libraryViewModel.forceReload(ReloadType.Artists)
} }
override fun onPause() {
super.onPause()
if (cab.isActive()) {
cab.destroy()
}
}
} }

View file

@ -24,7 +24,6 @@ import androidx.navigation.navOptions
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.activities.base.AbsMusicServiceActivity import code.name.monkey.retromusic.activities.base.AbsMusicServiceActivity
import code.name.monkey.retromusic.interfaces.IMusicServiceEventListener import code.name.monkey.retromusic.interfaces.IMusicServiceEventListener
import code.name.monkey.retromusic.util.maybeShowAnnoyingToasts
/** /**
* Created by hemanths on 18/08/17. * Created by hemanths on 18/08/17.
@ -66,7 +65,6 @@ open class AbsMusicServiceFragment(@LayoutRes layout: Int) : Fragment(layout),
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
serviceActivity?.addMusicServiceEventListener(this) serviceActivity?.addMusicServiceEventListener(this)
maybeShowAnnoyingToasts()
} }
@CallSuper @CallSuper

View file

@ -27,6 +27,7 @@ import androidx.recyclerview.widget.RecyclerView
import code.name.monkey.appthemehelper.common.ATHToolbarActivity import code.name.monkey.appthemehelper.common.ATHToolbarActivity
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.adapter.base.AbsMultiSelectAdapter
import code.name.monkey.retromusic.databinding.FragmentMainRecyclerBinding import code.name.monkey.retromusic.databinding.FragmentMainRecyclerBinding
import code.name.monkey.retromusic.dialogs.CreatePlaylistDialog import code.name.monkey.retromusic.dialogs.CreatePlaylistDialog
import code.name.monkey.retromusic.dialogs.ImportPlaylistDialog import code.name.monkey.retromusic.dialogs.ImportPlaylistDialog
@ -225,4 +226,9 @@ abstract class AbsRecyclerViewFragment<A : RecyclerView.Adapter<*>, LM : Recycle
super.onDestroyView() super.onDestroyView()
_binding = null _binding = null
} }
override fun onPause() {
super.onPause()
(adapter as? AbsMultiSelectAdapter<*, *>)?.actionMode?.finish()
}
} }

View file

@ -40,12 +40,13 @@ import code.name.monkey.retromusic.adapter.Storage
import code.name.monkey.retromusic.adapter.StorageAdapter import code.name.monkey.retromusic.adapter.StorageAdapter
import code.name.monkey.retromusic.adapter.StorageClickListener import code.name.monkey.retromusic.adapter.StorageClickListener
import code.name.monkey.retromusic.databinding.FragmentFolderBinding import code.name.monkey.retromusic.databinding.FragmentFolderBinding
import code.name.monkey.retromusic.extensions.* import code.name.monkey.retromusic.extensions.dip
import code.name.monkey.retromusic.extensions.showToast
import code.name.monkey.retromusic.extensions.textColorPrimary
import code.name.monkey.retromusic.extensions.textColorSecondary
import code.name.monkey.retromusic.fragments.base.AbsMainActivityFragment import code.name.monkey.retromusic.fragments.base.AbsMainActivityFragment
import code.name.monkey.retromusic.helper.MusicPlayerRemote.openQueue import code.name.monkey.retromusic.helper.MusicPlayerRemote.openQueue
import code.name.monkey.retromusic.helper.menu.SongsMenuHelper import code.name.monkey.retromusic.helper.menu.SongsMenuHelper
import code.name.monkey.retromusic.interfaces.ICabCallback
import code.name.monkey.retromusic.interfaces.ICabHolder
import code.name.monkey.retromusic.interfaces.ICallbacks import code.name.monkey.retromusic.interfaces.ICallbacks
import code.name.monkey.retromusic.interfaces.IMainActivityFragmentCallbacks import code.name.monkey.retromusic.interfaces.IMainActivityFragmentCallbacks
import code.name.monkey.retromusic.misc.UpdateToastMediaScannerCompletionListener import code.name.monkey.retromusic.misc.UpdateToastMediaScannerCompletionListener
@ -54,16 +55,11 @@ import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.providers.BlacklistStore import code.name.monkey.retromusic.providers.BlacklistStore
import code.name.monkey.retromusic.util.FileUtil import code.name.monkey.retromusic.util.FileUtil
import code.name.monkey.retromusic.util.PreferenceUtil.startDirectory import code.name.monkey.retromusic.util.PreferenceUtil.startDirectory
import code.name.monkey.retromusic.util.RetroColorUtil
import code.name.monkey.retromusic.util.ThemedFastScroller.create import code.name.monkey.retromusic.util.ThemedFastScroller.create
import code.name.monkey.retromusic.util.getExternalStorageDirectory import code.name.monkey.retromusic.util.getExternalStorageDirectory
import code.name.monkey.retromusic.util.getExternalStoragePublicDirectory import code.name.monkey.retromusic.util.getExternalStoragePublicDirectory
import code.name.monkey.retromusic.views.BreadCrumbLayout.Crumb import code.name.monkey.retromusic.views.BreadCrumbLayout.Crumb
import code.name.monkey.retromusic.views.BreadCrumbLayout.SelectionCallback import code.name.monkey.retromusic.views.BreadCrumbLayout.SelectionCallback
import com.afollestad.materialcab.attached.AttachedCab
import com.afollestad.materialcab.attached.destroy
import com.afollestad.materialcab.attached.isActive
import com.afollestad.materialcab.createCab
import com.google.android.material.snackbar.Snackbar import com.google.android.material.snackbar.Snackbar
import com.google.android.material.transition.MaterialFadeThrough import com.google.android.material.transition.MaterialFadeThrough
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
@ -76,7 +72,7 @@ import java.lang.ref.WeakReference
import java.util.* import java.util.*
class FoldersFragment : AbsMainActivityFragment(R.layout.fragment_folder), class FoldersFragment : AbsMainActivityFragment(R.layout.fragment_folder),
IMainActivityFragmentCallbacks, ICabHolder, SelectionCallback, ICallbacks, IMainActivityFragmentCallbacks, SelectionCallback, ICallbacks,
LoaderManager.LoaderCallbacks<List<File>>, StorageClickListener { LoaderManager.LoaderCallbacks<List<File>>, StorageClickListener {
private var _binding: FragmentFolderBinding? = null private var _binding: FragmentFolderBinding? = null
private val binding get() = _binding!! private val binding get() = _binding!!
@ -85,7 +81,6 @@ class FoldersFragment : AbsMainActivityFragment(R.layout.fragment_folder),
private var adapter: SongFileAdapter? = null private var adapter: SongFileAdapter? = null
private var storageAdapter: StorageAdapter? = null private var storageAdapter: StorageAdapter? = null
private var cab: AttachedCab? = null
private val fileComparator = Comparator { lhs: File, rhs: File -> private val fileComparator = Comparator { lhs: File, rhs: File ->
if (lhs.isDirectory && !rhs.isDirectory) { if (lhs.isDirectory && !rhs.isDirectory) {
return@Comparator -1 return@Comparator -1
@ -149,16 +144,10 @@ class FoldersFragment : AbsMainActivityFragment(R.layout.fragment_folder),
override fun onPause() { override fun onPause() {
super.onPause() super.onPause()
saveScrollPosition() saveScrollPosition()
if (cab.isActive()) { adapter?.actionMode?.finish()
cab.destroy()
}
} }
override fun handleBackPress(): Boolean { override fun handleBackPress(): Boolean {
if (cab != null && cab!!.isActive()) {
cab?.destroy()
return true
}
if (binding.breadCrumbs.popHistory()) { if (binding.breadCrumbs.popHistory()) {
setCrumb(binding.breadCrumbs.lastHistory(), false) setCrumb(binding.breadCrumbs.lastHistory(), false)
return true return true
@ -388,24 +377,6 @@ class FoldersFragment : AbsMainActivityFragment(R.layout.fragment_folder),
checkForMargins() checkForMargins()
} }
override fun openCab(menuRes: Int, callback: ICabCallback): AttachedCab {
if (cab != null && cab!!.isActive()) {
cab?.destroy()
}
cab = createCab(R.id.toolbar_container) {
menu(menuRes)
closeDrawable(R.drawable.ic_close)
backgroundColor(literal = RetroColorUtil.shiftBackgroundColor(surfaceColor()))
slideDown()
onCreate { cab, menu -> callback.onCabCreated(cab, menu) }
onSelection {
callback.onCabItemClicked(it)
}
onDestroy { callback.onCabFinished(it) }
}
return cab as AttachedCab
}
private fun checkForMargins() { private fun checkForMargins() {
if (mainActivity.isBottomNavVisible) { if (mainActivity.isBottomNavVisible) {
binding.recyclerView.updateLayoutParams<ViewGroup.MarginLayoutParams> { binding.recyclerView.updateLayoutParams<ViewGroup.MarginLayoutParams> {
@ -487,7 +458,7 @@ class FoldersFragment : AbsMainActivityFragment(R.layout.fragment_folder),
} }
private fun setUpRecyclerView() { private fun setUpRecyclerView() {
binding.recyclerView.layoutManager = LinearLayoutManager(activity) binding.recyclerView.layoutManager = LinearLayoutManager(requireContext())
create( create(
binding.recyclerView binding.recyclerView
) )
@ -593,7 +564,7 @@ class FoldersFragment : AbsMainActivityFragment(R.layout.fragment_folder),
} }
private fun switchToFileAdapter() { private fun switchToFileAdapter() {
adapter = SongFileAdapter(mainActivity, LinkedList(), R.layout.item_list, this, this) adapter = SongFileAdapter(mainActivity, LinkedList(), R.layout.item_list, this)
adapter!!.registerAdapterDataObserver( adapter!!.registerAdapterDataObserver(
object : RecyclerView.AdapterDataObserver() { object : RecyclerView.AdapterDataObserver() {
override fun onChanged() { override fun onChanged() {

View file

@ -71,7 +71,7 @@ class GenreDetailsFragment : AbsMainActivityFragment(R.layout.fragment_playlist_
} }
private fun setupRecyclerView() { private fun setupRecyclerView() {
songAdapter = SongAdapter(requireActivity(), ArrayList(), R.layout.item_list, null) songAdapter = SongAdapter(requireActivity(), ArrayList(), R.layout.item_list)
binding.recyclerView.apply { binding.recyclerView.apply {
itemAnimator = DefaultItemAnimator() itemAnimator = DefaultItemAnimator()
layoutManager = LinearLayoutManager(requireContext()) layoutManager = LinearLayoutManager(requireContext())

View file

@ -340,12 +340,12 @@ class LyricsFragment : AbsMainActivityFragment(R.layout.fragment_lyrics),
lyricsType = if (!loadLRCLyrics()) { lyricsType = if (!loadLRCLyrics()) {
binding.lyricsView.isVisible = false binding.lyricsView.isVisible = false
loadNormalLyrics() loadNormalLyrics()
LyricsType.SYNCED_LYRICS LyricsType.NORMAL_LYRICS
} else { } else {
binding.normalLyrics.isVisible = false binding.normalLyrics.isVisible = false
binding.noLyricsFound.isVisible = false binding.noLyricsFound.isVisible = false
binding.lyricsView.isVisible = true binding.lyricsView.isVisible = true
LyricsType.NORMAL_LYRICS LyricsType.SYNCED_LYRICS
} }
} }

View file

@ -20,7 +20,6 @@ import android.view.Menu
import android.view.MenuInflater import android.view.MenuInflater
import android.view.MenuItem import android.view.MenuItem
import android.view.View import android.view.View
import androidx.activity.addCallback
import androidx.core.os.bundleOf import androidx.core.os.bundleOf
import androidx.core.view.doOnPreDraw import androidx.core.view.doOnPreDraw
import androidx.core.view.isVisible import androidx.core.view.isVisible
@ -36,27 +35,19 @@ import code.name.monkey.retromusic.adapter.song.ShuffleButtonSongAdapter
import code.name.monkey.retromusic.adapter.song.SongAdapter import code.name.monkey.retromusic.adapter.song.SongAdapter
import code.name.monkey.retromusic.databinding.FragmentPlaylistDetailBinding import code.name.monkey.retromusic.databinding.FragmentPlaylistDetailBinding
import code.name.monkey.retromusic.db.toSong import code.name.monkey.retromusic.db.toSong
import code.name.monkey.retromusic.extensions.surfaceColor
import code.name.monkey.retromusic.fragments.base.AbsMainActivityFragment import code.name.monkey.retromusic.fragments.base.AbsMainActivityFragment
import code.name.monkey.retromusic.interfaces.IAlbumClickListener import code.name.monkey.retromusic.interfaces.IAlbumClickListener
import code.name.monkey.retromusic.interfaces.IArtistClickListener import code.name.monkey.retromusic.interfaces.IArtistClickListener
import code.name.monkey.retromusic.interfaces.ICabCallback
import code.name.monkey.retromusic.interfaces.ICabHolder
import code.name.monkey.retromusic.model.Album import code.name.monkey.retromusic.model.Album
import code.name.monkey.retromusic.model.Artist import code.name.monkey.retromusic.model.Artist
import code.name.monkey.retromusic.util.RetroColorUtil
import code.name.monkey.retromusic.util.RetroUtil import code.name.monkey.retromusic.util.RetroUtil
import com.afollestad.materialcab.attached.AttachedCab
import com.afollestad.materialcab.attached.destroy
import com.afollestad.materialcab.attached.isActive
import com.afollestad.materialcab.createCab
import com.google.android.material.shape.MaterialShapeDrawable import com.google.android.material.shape.MaterialShapeDrawable
import com.google.android.material.snackbar.Snackbar import com.google.android.material.snackbar.Snackbar
import com.google.android.material.transition.MaterialSharedAxis import com.google.android.material.transition.MaterialSharedAxis
class DetailListFragment : AbsMainActivityFragment(R.layout.fragment_playlist_detail), class DetailListFragment : AbsMainActivityFragment(R.layout.fragment_playlist_detail),
IArtistClickListener, IAlbumClickListener, ICabHolder { IArtistClickListener, IAlbumClickListener {
private val args by navArgs<DetailListFragmentArgs>() private val args by navArgs<DetailListFragmentArgs>()
private var _binding: FragmentPlaylistDetailBinding? = null private var _binding: FragmentPlaylistDetailBinding? = null
private val binding get() = _binding!! private val binding get() = _binding!!
@ -104,12 +95,6 @@ class DetailListFragment : AbsMainActivityFragment(R.layout.fragment_playlist_de
binding.appBarLayout.statusBarForeground = binding.appBarLayout.statusBarForeground =
MaterialShapeDrawable.createWithElevationOverlay(requireContext()) MaterialShapeDrawable.createWithElevationOverlay(requireContext())
requireActivity().onBackPressedDispatcher.addCallback(viewLifecycleOwner) {
if (!handleBackPress()) {
remove()
findNavController().navigateUp()
}
}
} }
private fun lastAddedSongs() { private fun lastAddedSongs() {
@ -117,7 +102,7 @@ class DetailListFragment : AbsMainActivityFragment(R.layout.fragment_playlist_de
val songAdapter = ShuffleButtonSongAdapter( val songAdapter = ShuffleButtonSongAdapter(
requireActivity(), requireActivity(),
mutableListOf(), mutableListOf(),
R.layout.item_list, this R.layout.item_list
) )
binding.recyclerView.apply { binding.recyclerView.apply {
adapter = songAdapter adapter = songAdapter
@ -134,7 +119,7 @@ class DetailListFragment : AbsMainActivityFragment(R.layout.fragment_playlist_de
val songAdapter = ShuffleButtonSongAdapter( val songAdapter = ShuffleButtonSongAdapter(
requireActivity(), requireActivity(),
mutableListOf(), mutableListOf(),
R.layout.item_list, this R.layout.item_list
) )
binding.recyclerView.apply { binding.recyclerView.apply {
adapter = songAdapter adapter = songAdapter
@ -151,7 +136,7 @@ class DetailListFragment : AbsMainActivityFragment(R.layout.fragment_playlist_de
val songAdapter = ShuffleButtonSongAdapter( val songAdapter = ShuffleButtonSongAdapter(
requireActivity(), requireActivity(),
mutableListOf(), mutableListOf(),
R.layout.item_list, this R.layout.item_list
) )
binding.recyclerView.apply { binding.recyclerView.apply {
adapter = songAdapter adapter = songAdapter
@ -170,7 +155,7 @@ class DetailListFragment : AbsMainActivityFragment(R.layout.fragment_playlist_de
val songAdapter = SongAdapter( val songAdapter = SongAdapter(
requireActivity(), requireActivity(),
mutableListOf(), mutableListOf(),
R.layout.item_list, this R.layout.item_list
) )
binding.recyclerView.apply { binding.recyclerView.apply {
adapter = songAdapter adapter = songAdapter
@ -211,14 +196,14 @@ class DetailListFragment : AbsMainActivityFragment(R.layout.fragment_playlist_de
requireActivity(), requireActivity(),
artists, artists,
R.layout.item_grid_circle, R.layout.item_grid_circle,
this, this@DetailListFragment this
) )
private fun albumAdapter(albums: List<Album>): AlbumAdapter = AlbumAdapter( private fun albumAdapter(albums: List<Album>): AlbumAdapter = AlbumAdapter(
requireActivity(), requireActivity(),
albums, albums,
R.layout.item_grid, R.layout.item_grid,
this, this@DetailListFragment this
) )
private fun linearLayoutManager(): LinearLayoutManager = private fun linearLayoutManager(): LinearLayoutManager =
@ -260,38 +245,6 @@ class DetailListFragment : AbsMainActivityFragment(R.layout.fragment_playlist_de
_binding = null _binding = null
} }
private var cab: AttachedCab? = null
private fun handleBackPress(): Boolean {
cab?.let {
if (it.isActive()) {
it.destroy()
return true
}
}
return false
}
override fun openCab(menuRes: Int, callback: ICabCallback): AttachedCab {
cab?.let {
if (it.isActive()) {
it.destroy()
}
}
cab = createCab(R.id.toolbar_container) {
menu(menuRes)
closeDrawable(R.drawable.ic_close)
backgroundColor(literal = RetroColorUtil.shiftBackgroundColor(surfaceColor()))
slideDown()
onCreate { cab, menu -> callback.onCabCreated(cab, menu) }
onSelection {
callback.onCabItemClicked(it)
}
onDestroy { callback.onCabFinished(it) }
}
return cab as AttachedCab
}
override fun onCreateMenu(menu: Menu, inflater: MenuInflater) { override fun onCreateMenu(menu: Menu, inflater: MenuInflater) {
inflater.inflate(R.menu.menu_clear_history, menu) inflater.inflate(R.menu.menu_clear_history, menu)
if (showClearHistoryOption) { if (showClearHistoryOption) {

View file

@ -55,7 +55,7 @@ class PlayingQueueRVFragment : AbsRecyclerViewFragment<PlayingQueueAdapter, Line
setNavigationOnClickListener { setNavigationOnClickListener {
findNavController().navigateUp() findNavController().navigateUp()
} }
setNavigationIcon(R.drawable.ic_keyboard_backspace_black) setNavigationIcon(R.drawable.ic_arrow_back)
} }
} }

View file

@ -103,18 +103,19 @@ class LockScreenControlsFragment :
} }
override fun setColor(color: MediaNotificationProcessor) { override fun setColor(color: MediaNotificationProcessor) {
val context = context ?: return
val colorBg = ATHUtil.resolveColor(requireContext(), android.R.attr.colorBackground) val colorBg = ATHUtil.resolveColor(context, android.R.attr.colorBackground)
if (ColorUtil.isColorLight(colorBg)) { if (ColorUtil.isColorLight(colorBg)) {
lastPlaybackControlsColor = lastPlaybackControlsColor =
MaterialValueHelper.getSecondaryTextColor(requireContext(), true) MaterialValueHelper.getSecondaryTextColor(context, true)
lastDisabledPlaybackControlsColor = lastDisabledPlaybackControlsColor =
MaterialValueHelper.getSecondaryDisabledTextColor(requireContext(), true) MaterialValueHelper.getSecondaryDisabledTextColor(context, true)
} else { } else {
lastPlaybackControlsColor = lastPlaybackControlsColor =
MaterialValueHelper.getPrimaryTextColor(requireContext(), false) MaterialValueHelper.getPrimaryTextColor(context, false)
lastDisabledPlaybackControlsColor = lastDisabledPlaybackControlsColor =
MaterialValueHelper.getPrimaryDisabledTextColor(requireContext(), false) MaterialValueHelper.getPrimaryDisabledTextColor(context, false)
} }
val colorFinal = if (PreferenceUtil.isAdaptiveColor) { val colorFinal = if (PreferenceUtil.isAdaptiveColor) {
@ -135,7 +136,7 @@ class LockScreenControlsFragment :
TintHelper.setTintAuto( TintHelper.setTintAuto(
binding.playPauseButton, binding.playPauseButton,
MaterialValueHelper.getPrimaryTextColor(requireContext(), isDark), MaterialValueHelper.getPrimaryTextColor(context, isDark),
false false
) )
TintHelper.setTintAuto(binding.playPauseButton, colorFinal, true) TintHelper.setTintAuto(binding.playPauseButton, colorFinal, true)

View file

@ -20,16 +20,9 @@ import code.name.monkey.retromusic.db.toSongs
import code.name.monkey.retromusic.extensions.surfaceColor import code.name.monkey.retromusic.extensions.surfaceColor
import code.name.monkey.retromusic.fragments.base.AbsMainActivityFragment import code.name.monkey.retromusic.fragments.base.AbsMainActivityFragment
import code.name.monkey.retromusic.helper.menu.PlaylistMenuHelper import code.name.monkey.retromusic.helper.menu.PlaylistMenuHelper
import code.name.monkey.retromusic.interfaces.ICabCallback
import code.name.monkey.retromusic.interfaces.ICabHolder
import code.name.monkey.retromusic.model.Song import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.util.MusicUtil import code.name.monkey.retromusic.util.MusicUtil
import code.name.monkey.retromusic.util.RetroColorUtil
import code.name.monkey.retromusic.util.ThemedFastScroller import code.name.monkey.retromusic.util.ThemedFastScroller
import com.afollestad.materialcab.attached.AttachedCab
import com.afollestad.materialcab.attached.destroy
import com.afollestad.materialcab.attached.isActive
import com.afollestad.materialcab.createCab
import com.google.android.material.shape.MaterialShapeDrawable import com.google.android.material.shape.MaterialShapeDrawable
import com.google.android.material.transition.MaterialArcMotion import com.google.android.material.transition.MaterialArcMotion
import com.google.android.material.transition.MaterialContainerTransform import com.google.android.material.transition.MaterialContainerTransform
@ -41,8 +34,7 @@ import org.koin.androidx.viewmodel.ext.android.viewModel
import org.koin.core.parameter.parametersOf import org.koin.core.parameter.parametersOf
class PlaylistDetailsFragment : AbsMainActivityFragment(R.layout.fragment_playlist_detail), class PlaylistDetailsFragment : AbsMainActivityFragment(R.layout.fragment_playlist_detail) {
ICabHolder {
private val arguments by navArgs<PlaylistDetailsFragmentArgs>() private val arguments by navArgs<PlaylistDetailsFragmentArgs>()
private val viewModel by viewModel<PlaylistDetailsViewModel> { private val viewModel by viewModel<PlaylistDetailsViewModel> {
parametersOf(arguments.extraPlaylist) parametersOf(arguments.extraPlaylist)
@ -95,8 +87,7 @@ class PlaylistDetailsFragment : AbsMainActivityFragment(R.layout.fragment_playli
playlist.playlistEntity, playlist.playlistEntity,
requireActivity(), requireActivity(),
ArrayList(), ArrayList(),
R.layout.item_queue, R.layout.item_queue
this
) )
val dragDropManager = RecyclerViewDragDropManager() val dragDropManager = RecyclerViewDragDropManager()
@ -165,26 +156,4 @@ class PlaylistDetailsFragment : AbsMainActivityFragment(R.layout.fragment_playli
super.onDestroyView() super.onDestroyView()
_binding = null _binding = null
} }
private var cab: AttachedCab? = null
override fun openCab(menuRes: Int, callback: ICabCallback): AttachedCab {
cab?.let {
if (it.isActive()) {
it.destroy()
}
}
cab = createCab(R.id.toolbar_container) {
menu(menuRes)
closeDrawable(R.drawable.ic_close)
backgroundColor(literal = RetroColorUtil.shiftBackgroundColor(surfaceColor()))
slideDown()
onCreate { cab, menu -> callback.onCabCreated(cab, menu) }
onSelection {
callback.onCabItemClicked(it)
}
onDestroy { callback.onCabFinished(it) }
}
return cab as AttachedCab
}
} }

View file

@ -66,7 +66,6 @@ class PlaylistsFragment :
requireActivity(), requireActivity(),
dataSet, dataSet,
itemLayoutRes(), itemLayoutRes(),
null,
this this
) )
} }

View file

@ -201,7 +201,7 @@ class PlayingQueueFragment : AbsMusicServiceFragment(R.layout.fragment_playing_q
} }
setTitle(R.string.now_playing_queue) setTitle(R.string.now_playing_queue)
setTitleTextAppearance(context, R.style.ToolbarTextAppearanceNormal) setTitleTextAppearance(context, R.style.ToolbarTextAppearanceNormal)
setNavigationIcon(R.drawable.ic_keyboard_backspace_black) setNavigationIcon(R.drawable.ic_arrow_back)
ToolbarContentTintHelper.colorBackButton(this) ToolbarContentTintHelper.colorBackButton(this)
} }
} }

View file

@ -16,29 +16,19 @@ package code.name.monkey.retromusic.fragments.songs
import android.os.Bundle import android.os.Bundle
import android.view.* import android.view.*
import androidx.activity.addCallback
import androidx.annotation.LayoutRes import androidx.annotation.LayoutRes
import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.GridLayoutManager
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.adapter.song.SongAdapter import code.name.monkey.retromusic.adapter.song.SongAdapter
import code.name.monkey.retromusic.extensions.setUpMediaRouteButton import code.name.monkey.retromusic.extensions.setUpMediaRouteButton
import code.name.monkey.retromusic.extensions.surfaceColor
import code.name.monkey.retromusic.fragments.GridStyle import code.name.monkey.retromusic.fragments.GridStyle
import code.name.monkey.retromusic.fragments.ReloadType import code.name.monkey.retromusic.fragments.ReloadType
import code.name.monkey.retromusic.fragments.base.AbsRecyclerViewCustomGridSizeFragment import code.name.monkey.retromusic.fragments.base.AbsRecyclerViewCustomGridSizeFragment
import code.name.monkey.retromusic.helper.SortOrder.SongSortOrder import code.name.monkey.retromusic.helper.SortOrder.SongSortOrder
import code.name.monkey.retromusic.interfaces.ICabCallback
import code.name.monkey.retromusic.interfaces.ICabHolder
import code.name.monkey.retromusic.util.PreferenceUtil import code.name.monkey.retromusic.util.PreferenceUtil
import code.name.monkey.retromusic.util.RetroColorUtil
import code.name.monkey.retromusic.util.RetroUtil import code.name.monkey.retromusic.util.RetroUtil
import com.afollestad.materialcab.attached.AttachedCab
import com.afollestad.materialcab.attached.destroy
import com.afollestad.materialcab.attached.isActive
import com.afollestad.materialcab.createCab
class SongsFragment : AbsRecyclerViewCustomGridSizeFragment<SongAdapter, GridLayoutManager>(), class SongsFragment : AbsRecyclerViewCustomGridSizeFragment<SongAdapter, GridLayoutManager>() {
ICabHolder {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
libraryViewModel.getSongs().observe(viewLifecycleOwner) { libraryViewModel.getSongs().observe(viewLifecycleOwner) {
@ -47,12 +37,6 @@ class SongsFragment : AbsRecyclerViewCustomGridSizeFragment<SongAdapter, GridLay
else else
adapter?.swapDataSet(listOf()) adapter?.swapDataSet(listOf())
} }
requireActivity().onBackPressedDispatcher.addCallback(viewLifecycleOwner) {
if (!handleBackPress()) {
remove()
requireActivity().onBackPressed()
}
}
} }
override val titleRes: Int override val titleRes: Int
@ -77,8 +61,7 @@ class SongsFragment : AbsRecyclerViewCustomGridSizeFragment<SongAdapter, GridLay
return SongAdapter( return SongAdapter(
requireActivity(), requireActivity(),
dataSet, dataSet,
itemLayoutRes(), itemLayoutRes()
this
) )
} }
@ -342,9 +325,7 @@ class SongsFragment : AbsRecyclerViewCustomGridSizeFragment<SongAdapter, GridLay
override fun onPause() { override fun onPause() {
super.onPause() super.onPause()
if (cab.isActive()) { adapter?.actionMode?.finish()
cab.destroy()
}
} }
companion object { companion object {
@ -356,36 +337,4 @@ class SongsFragment : AbsRecyclerViewCustomGridSizeFragment<SongAdapter, GridLay
return SongsFragment() return SongsFragment()
} }
} }
private var cab: AttachedCab? = null
private fun handleBackPress(): Boolean {
cab?.let {
if (it.isActive()) {
it.destroy()
return true
}
}
return false
}
override fun openCab(menuRes: Int, callback: ICabCallback): AttachedCab {
cab?.let {
if (it.isActive()) {
it.destroy()
}
}
cab = createCab(R.id.toolbar_container) {
menu(menuRes)
closeDrawable(R.drawable.ic_close)
backgroundColor(literal = RetroColorUtil.shiftBackgroundColor(surfaceColor()))
slideDown()
onCreate { cab, menu -> callback.onCabCreated(cab, menu) }
onSelection {
callback.onCabItemClicked(it)
}
onDestroy { callback.onCabFinished(it) }
}
return cab as AttachedCab
}
} }

View file

@ -1,27 +0,0 @@
/*
* Copyright (c) 2020 Hemanth Savarla.
*
* Licensed under the GNU General Public License v3
*
* This is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
*/
package code.name.monkey.retromusic.interfaces
import android.view.Menu
import android.view.MenuItem
import com.afollestad.materialcab.attached.AttachedCab
interface ICabCallback {
fun onCabCreated(cab: AttachedCab, menu: Menu): Boolean
fun onCabItemClicked(item: MenuItem): Boolean
fun onCabFinished(cab: AttachedCab): Boolean
}

View file

@ -1,22 +0,0 @@
/*
* Copyright (c) 2020 Hemanth Savarla.
*
* Licensed under the GNU General Public License v3
*
* This is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
*/
package code.name.monkey.retromusic.interfaces
import com.afollestad.materialcab.attached.AttachedCab
interface ICabHolder {
fun openCab(menuRes: Int, callback: ICabCallback): AttachedCab
}

View file

@ -431,7 +431,7 @@ public class LrcView extends View {
mTimePaint.setColor(mTimeTextColor); mTimePaint.setColor(mTimeTextColor);
String timeText = LrcUtils.formatTime(mLrcEntryList.get(centerLine).getTime()); String timeText = LrcUtils.formatTime(mLrcEntryList.get(centerLine).getTime());
float timeX = getWidth() - mTimeTextWidth / 2; float timeX = getWidth() - mTimeTextWidth / 2F;
float timeY = centerY - (mTimeFontMetrics.descent + mTimeFontMetrics.ascent) / 2; float timeY = centerY - (mTimeFontMetrics.descent + mTimeFontMetrics.ascent) / 2;
canvas.drawText(timeText, timeX, timeY, mTimePaint); canvas.drawText(timeText, timeX, timeY, mTimePaint);
} }
@ -531,7 +531,7 @@ public class LrcView extends View {
lrcEntry.init(mLrcPaint, (int) getLrcWidth(), mTextGravity); lrcEntry.init(mLrcPaint, (int) getLrcWidth(), mTextGravity);
} }
mOffset = getHeight() / 2; mOffset = getHeight() / 2F;
} }
private void reset() { private void reset() {
@ -611,7 +611,7 @@ public class LrcView extends View {
private float getOffset(int line) { private float getOffset(int line) {
if (mLrcEntryList.get(line).getOffset() == Float.MIN_VALUE) { if (mLrcEntryList.get(line).getOffset() == Float.MIN_VALUE) {
float offset = getHeight() / 2; float offset = getHeight() / 2F;
for (int i = 1; i <= line; i++) { for (int i = 1; i <= line; i++) {
offset -= offset -=
((mLrcEntryList.get(i - 1).getHeight() + mLrcEntryList.get(i).getHeight()) >> 1) ((mLrcEntryList.get(i - 1).getHeight() + mLrcEntryList.get(i).getHeight()) >> 1)

View file

@ -8,7 +8,7 @@ import kotlinx.parcelize.Parcelize
@Parcelize @Parcelize
class NotPlayedPlaylist : AbsSmartPlaylist( class NotPlayedPlaylist : AbsSmartPlaylist(
name = App.getContext().getString(R.string.not_recently_played), name = App.getContext().getString(R.string.not_recently_played),
iconRes = R.drawable.ic_watch_later iconRes = R.drawable.ic_audiotrack
) { ) {
override fun songs(): List<Song> { override fun songs(): List<Song> {
return topPlayedRepository.notRecentlyPlayedTracks() return topPlayedRepository.notRecentlyPlayedTracks()

View file

@ -55,7 +55,7 @@ class LibraryPreferenceDialog : DialogFragment() {
val categoryAdapter = CategoryInfoAdapter() val categoryAdapter = CategoryInfoAdapter()
binding.recyclerView.apply { binding.recyclerView.apply {
layoutManager = LinearLayoutManager(activity) layoutManager = LinearLayoutManager(requireContext())
adapter = categoryAdapter adapter = categoryAdapter
categoryAdapter.attachToRecyclerView(this) categoryAdapter.attachToRecyclerView(this)
} }

View file

@ -197,7 +197,7 @@ class MusicService : MediaBrowserServiceCompat(),
override fun onReceive(context: Context, intent: Intent) { override fun onReceive(context: Context, intent: Intent) {
if (isLockScreen && isPlaying) { if (isLockScreen && isPlaying) {
val lockIntent = Intent(context, LockScreenActivity::class.java) val lockIntent = Intent(context, LockScreenActivity::class.java)
lockIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP) lockIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK)
startActivity(lockIntent) startActivity(lockIntent)
} }
} }
@ -279,7 +279,7 @@ class MusicService : MediaBrowserServiceCompat(),
uiThreadHandler = Handler(Looper.getMainLooper()) uiThreadHandler = Handler(Looper.getMainLooper())
registerReceiver(widgetIntentReceiver, IntentFilter(APP_WIDGET_UPDATE)) registerReceiver(widgetIntentReceiver, IntentFilter(APP_WIDGET_UPDATE))
registerReceiver(updateFavoriteReceiver, IntentFilter(FAVORITE_STATE_CHANGED)) registerReceiver(updateFavoriteReceiver, IntentFilter(FAVORITE_STATE_CHANGED))
registerReceiver(lockScreenReceiver, IntentFilter(Intent.ACTION_SCREEN_OFF)) registerReceiver(lockScreenReceiver, IntentFilter(Intent.ACTION_SCREEN_ON))
sessionToken = mediaSession?.sessionToken sessionToken = mediaSession?.sessionToken
notificationManager = getSystemService() notificationManager = getSystemService()
initNotification() initNotification()

View file

@ -189,12 +189,12 @@ class PlayingNotificationClassic(
).toBitmap() ).toBitmap()
val prev = val prev =
context.getTintedDrawable( context.getTintedDrawable(
R.drawable.ic_skip_previous_round_white_32dp, R.drawable.ic_skip_previous,
primary primary
).toBitmap() ).toBitmap()
val next = val next =
context.getTintedDrawable( context.getTintedDrawable(
R.drawable.ic_skip_next_round_white_32dp, R.drawable.ic_skip_next,
primary primary
).toBitmap() ).toBitmap()
val playPause = getPlayPauseBitmap(true) val playPause = getPlayPauseBitmap(true)

View file

@ -75,12 +75,12 @@ class PlayingNotificationImpl24(
val toggleFavorite = buildFavoriteAction(false) val toggleFavorite = buildFavoriteAction(false)
val playPauseAction = buildPlayAction(true) val playPauseAction = buildPlayAction(true)
val previousAction = NotificationCompat.Action( val previousAction = NotificationCompat.Action(
R.drawable.ic_skip_previous_round_white_32dp, R.drawable.ic_skip_previous,
context.getString(R.string.action_previous), context.getString(R.string.action_previous),
retrievePlaybackAction(ACTION_REWIND) retrievePlaybackAction(ACTION_REWIND)
) )
val nextAction = NotificationCompat.Action( val nextAction = NotificationCompat.Action(
R.drawable.ic_skip_next_round_white_32dp, R.drawable.ic_skip_next,
context.getString(R.string.action_next), context.getString(R.string.action_next),
retrievePlaybackAction(ACTION_SKIP) retrievePlaybackAction(ACTION_SKIP)
) )

View file

@ -12,7 +12,8 @@ import code.name.monkey.retromusic.extensions.showToast
fun Activity.maybeShowAnnoyingToasts() { fun Activity.maybeShowAnnoyingToasts() {
if (BuildConfig.APPLICATION_ID != "code.name.monkey.retromusic" && if (BuildConfig.APPLICATION_ID != "code.name.monkey.retromusic" &&
BuildConfig.APPLICATION_ID != "code.name.monkey.retromusic.debug" BuildConfig.APPLICATION_ID != "code.name.monkey.retromusic.debug"&&
BuildConfig.APPLICATION_ID != "code.name.monkey.retromusic.normal"
) { ) {
if (BuildConfig.DEBUG) { if (BuildConfig.DEBUG) {
// Log these things to console, if the plagiarizer even cares to check it // Log these things to console, if the plagiarizer even cares to check it
@ -32,8 +33,4 @@ fun Activity.maybeShowAnnoyingToasts() {
} }
} }
} }
}
fun Fragment.maybeShowAnnoyingToasts() {
requireActivity().maybeShowAnnoyingToasts()
} }

View file

@ -0,0 +1,151 @@
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package code.name.monkey.retromusic.views
import android.animation.Animator
import android.animation.ObjectAnimator
import android.content.Context
import android.content.res.ColorStateList
import android.util.AttributeSet
import android.util.Property
import android.view.animation.LinearInterpolator
import android.widget.FrameLayout
import android.widget.TextView
import androidx.annotation.VisibleForTesting
import code.name.monkey.retromusic.R
import java.text.NumberFormat
/**
* View that shows an integer number. It provides a smooth roll animation on changing the
* number.
*/
class NumberRollView(context: Context?, attrs: AttributeSet?) :
FrameLayout(context!!, attrs) {
private var mUpNumber: TextView? = null
private var mDownNumber: TextView? = null
private var mNumber = 0f
private var mLastRollAnimator: Animator? = null
private var mStringId = R.string.x_selected
private var mStringIdForZero = 0
override fun onFinishInflate() {
super.onFinishInflate()
mUpNumber = findViewById(R.id.up)
mDownNumber = findViewById(R.id.down)
assert(mUpNumber != null)
assert(mDownNumber != null)
setNumberRoll(mNumber)
}
/**
* Sets a number to display.
* @param animate Whether it should smoothly animate to the number.
*/
fun setNumber(number: Int, animate: Boolean) {
if (mLastRollAnimator != null) mLastRollAnimator!!.cancel()
if (animate) {
val rollAnimator: Animator =
ObjectAnimator.ofFloat(this, NUMBER_PROPERTY, number.toFloat())
rollAnimator.interpolator = LinearInterpolator()
rollAnimator.start()
mLastRollAnimator = rollAnimator
} else {
setNumberRoll(number.toFloat())
}
}
/**
* @param stringId The id of the string to use for the description. The string must be a plural
* that has one placeholder for a quantity.
*/
fun setString(stringId: Int) {
mStringId = stringId
}
/**
* @param stringIdForZero The id of the string to use for the description when the number is
* zero.
*/
fun setStringForZero(stringIdForZero: Int) {
mStringIdForZero = stringIdForZero
}
/**
* Gets the current number roll position.
*/
private fun getNumberRoll(): Float {
return mNumber
}
/**
* Sets the number roll position.
*/
private fun setNumberRoll(number: Float) {
mNumber = number
val downNumber = number.toInt()
val upNumber = downNumber + 1
val numberFormatter = NumberFormat.getIntegerInstance()
var newString = if (mStringId != 0) {
if (upNumber == 0 && mStringIdForZero != 0) resources.getString(mStringIdForZero) else resources.getString(
mStringId,
upNumber
)
} else {
numberFormatter.format(upNumber.toLong())
}
if (newString != mUpNumber!!.text.toString()) {
mUpNumber!!.text = newString
}
newString = if (mStringId != 0) {
if (downNumber == 0 && mStringIdForZero != 0) resources.getString(mStringIdForZero) else resources.getString(
mStringId,
downNumber
)
} else {
numberFormatter.format(downNumber.toLong())
}
if (newString != mDownNumber!!.text.toString()) {
mDownNumber!!.text = newString
}
val offset = number % 1.0f
mUpNumber!!.translationY = mUpNumber!!.height * (offset - 1.0f)
mDownNumber!!.translationY = mDownNumber!!.height * offset
mUpNumber!!.alpha = offset
mDownNumber!!.alpha = 1.0f - offset
}
/** Ends any in-progress animations. */
@VisibleForTesting
fun endAnimationsForTesting() {
if (mLastRollAnimator != null) mLastRollAnimator!!.end()
}
/**
* Update the text color with [ColorStateList] for both [TextView].
* @param resId The new text [ColorStateList] to use.
*/
fun setTextColorStateList(colorStateList: ColorStateList?) {
mUpNumber!!.setTextColor(colorStateList)
mDownNumber!!.setTextColor(colorStateList)
}
companion object {
/**
* A Property wrapper around the `number` functionality handled by the
* [NumberRollView.setNumberRoll] and [NumberRollView.getNumberRoll]
* methods.
*/
val NUMBER_PROPERTY: Property<NumberRollView, Float> =
object : Property<NumberRollView, Float>(
Float::class.java, ""
) {
override fun set(view: NumberRollView, value: Float) {
view.setNumberRoll(value)
}
override fun get(view: NumberRollView): Float {
return view.getNumberRoll()
}
}
}
}

View file

@ -14,7 +14,6 @@
limitations under the License. limitations under the License.
--> -->
<set xmlns:android="http://schemas.android.com/apk/res/android" <set xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:shareInterpolator="false"> android:shareInterpolator="false">
<alpha <alpha
android:duration="50" android:duration="50"
@ -36,6 +35,5 @@
android:pivotX="50%" android:pivotX="50%"
android:pivotY="50%" android:pivotY="50%"
android:toXScale="1" android:toXScale="1"
android:toYScale="1" android:toYScale="1" />
tools:targetApi="lollipop" />
</set> </set>

View file

@ -1,24 +1,10 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path <path
android:fillColor="@android:color/white" android:fillColor="@android:color/white"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM7.07,18.28c0.43,-0.9 3.05,-1.78 4.93,-1.78s4.51,0.88 4.93,1.78C15.57,19.36 13.86,20 12,20s-3.57,-0.64 -4.93,-1.72zM18.36,16.83c-1.43,-1.74 -4.9,-2.33 -6.36,-2.33s-4.93,0.59 -6.36,2.33C4.62,15.49 4,13.82 4,12c0,-4.41 3.59,-8 8,-8s8,3.59 8,8c0,1.82 -0.62,3.49 -1.64,4.83zM12,6c-1.94,0 -3.5,1.56 -3.5,3.5S10.06,13 12,13s3.5,-1.56 3.5,-3.5S13.94,6 12,6zM12,11c-0.83,0 -1.5,-0.67 -1.5,-1.5S11.17,8 12,8s1.5,0.67 1.5,1.5S12.83,11 12,11z" /> android:pathData="M5.85,17.1Q7.125,16.125 8.7,15.562Q10.275,15 12,15Q13.725,15 15.3,15.562Q16.875,16.125 18.15,17.1Q19.025,16.075 19.513,14.775Q20,13.475 20,12Q20,8.675 17.663,6.337Q15.325,4 12,4Q8.675,4 6.338,6.337Q4,8.675 4,12Q4,13.475 4.488,14.775Q4.975,16.075 5.85,17.1ZM12,13Q10.525,13 9.512,11.988Q8.5,10.975 8.5,9.5Q8.5,8.025 9.512,7.012Q10.525,6 12,6Q13.475,6 14.488,7.012Q15.5,8.025 15.5,9.5Q15.5,10.975 14.488,11.988Q13.475,13 12,13ZM12,22Q9.925,22 8.1,21.212Q6.275,20.425 4.925,19.075Q3.575,17.725 2.788,15.9Q2,14.075 2,12Q2,9.925 2.788,8.1Q3.575,6.275 4.925,4.925Q6.275,3.575 8.1,2.787Q9.925,2 12,2Q14.075,2 15.9,2.787Q17.725,3.575 19.075,4.925Q20.425,6.275 21.212,8.1Q22,9.925 22,12Q22,14.075 21.212,15.9Q20.425,17.725 19.075,19.075Q17.725,20.425 15.9,21.212Q14.075,22 12,22ZM12,20Q13.325,20 14.5,19.613Q15.675,19.225 16.65,18.5Q15.675,17.775 14.5,17.387Q13.325,17 12,17Q10.675,17 9.5,17.387Q8.325,17.775 7.35,18.5Q8.325,19.225 9.5,19.613Q10.675,20 12,20ZM12,11Q12.65,11 13.075,10.575Q13.5,10.15 13.5,9.5Q13.5,8.85 13.075,8.425Q12.65,8 12,8Q11.35,8 10.925,8.425Q10.5,8.85 10.5,9.5Q10.5,10.15 10.925,10.575Q11.35,11 12,11ZM12,9.5Q12,9.5 12,9.5Q12,9.5 12,9.5Q12,9.5 12,9.5Q12,9.5 12,9.5Q12,9.5 12,9.5Q12,9.5 12,9.5Q12,9.5 12,9.5Q12,9.5 12,9.5ZM12,18.5Q12,18.5 12,18.5Q12,18.5 12,18.5Q12,18.5 12,18.5Q12,18.5 12,18.5Q12,18.5 12,18.5Q12,18.5 12,18.5Q12,18.5 12,18.5Q12,18.5 12,18.5Z"/>
</vector> </vector>

View file

@ -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="M10.875,19.3 L4.275,12.7Q4.125,12.55 4.062,12.375Q4,12.2 4,12Q4,11.8 4.062,11.625Q4.125,11.45 4.275,11.3L10.875,4.7Q11.15,4.425 11.562,4.412Q11.975,4.4 12.275,4.7Q12.575,4.975 12.588,5.387Q12.6,5.8 12.3,6.1L7.4,11H18.575Q19,11 19.288,11.287Q19.575,11.575 19.575,12Q19.575,12.425 19.288,12.712Q19,13 18.575,13H7.4L12.3,17.9Q12.575,18.175 12.588,18.6Q12.6,19.025 12.3,19.3Q12.025,19.6 11.6,19.6Q11.175,19.6 10.875,19.3Z"/>
</vector>

View file

@ -1,23 +1,10 @@
<!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:viewportWidth="24.0" android:viewportWidth="24"
android:viewportHeight="24.0"> android:viewportHeight="24"
<path android:tint="?attr/colorControlNormal">
android:fillColor="@color/md_white_1000" <path
android:pathData="M12,4l-1.41,1.41L16.17,11H4v2h12.17l-5.58,5.59L12,20l8,-8z" /> android:fillColor="@android:color/white"
android:pathData="M11.3,19.3Q11.025,19.025 11.012,18.6Q11,18.175 11.275,17.9L16.175,13H5Q4.575,13 4.287,12.712Q4,12.425 4,12Q4,11.575 4.287,11.287Q4.575,11 5,11H16.175L11.275,6.1Q11,5.825 11.012,5.4Q11.025,4.975 11.3,4.7Q11.575,4.425 12,4.425Q12.425,4.425 12.7,4.7L19.3,11.3Q19.45,11.425 19.513,11.612Q19.575,11.8 19.575,12Q19.575,12.2 19.513,12.375Q19.45,12.55 19.3,12.7L12.7,19.3Q12.425,19.575 12,19.575Q11.575,19.575 11.3,19.3Z"/>
</vector> </vector>

View file

@ -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="M10.75,19Q11.7,19 12.35,18.35Q13,17.7 13,16.75V13H15Q15.425,13 15.713,12.712Q16,12.425 16,12Q16,11.575 15.713,11.287Q15.425,11 15,11H13Q12.575,11 12.288,11.287Q12,11.575 12,12V14.875Q11.725,14.675 11.413,14.587Q11.1,14.5 10.75,14.5Q9.8,14.5 9.15,15.15Q8.5,15.8 8.5,16.75Q8.5,17.7 9.15,18.35Q9.8,19 10.75,19ZM6,22Q5.175,22 4.588,21.413Q4,20.825 4,20V4Q4,3.175 4.588,2.587Q5.175,2 6,2H13.175Q13.575,2 13.938,2.15Q14.3,2.3 14.575,2.575L19.425,7.425Q19.7,7.7 19.85,8.062Q20,8.425 20,8.825V20Q20,20.825 19.413,21.413Q18.825,22 18,22ZM13,4H6Q6,4 6,4Q6,4 6,4V20Q6,20 6,20Q6,20 6,20H18Q18,20 18,20Q18,20 18,20V9H14Q13.575,9 13.288,8.712Q13,8.425 13,8ZM6,4V8Q6,8.425 6,8.712Q6,9 6,9V4V8Q6,8.425 6,8.712Q6,9 6,9V20Q6,20 6,20Q6,20 6,20Q6,20 6,20Q6,20 6,20V4Q6,4 6,4Q6,4 6,4Z"/>
</vector>

View file

@ -1,24 +1,10 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2020 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path <path
android:fillColor="@color/md_white_1000" android:fillColor="@android:color/white"
android:pathData="M12 5v8.55c-0.94-0.54-2.1-0.75-3.33-0.32-1.34 0.48 -2.37 1.67-2.61 3.07-0.46 2.74 1.86 5.08 4.59 4.65 1.96-0.31 3.35-2.11 3.35-4.1V7h2c1.1 0 2-0.9 2-2s-0.9-2-2-2h-2c-1.1 0-2 0.9-2 2z" /> android:pathData="M10,21Q8.35,21 7.175,19.825Q6,18.65 6,17Q6,15.35 7.175,14.175Q8.35,13 10,13Q10.575,13 11.062,13.137Q11.55,13.275 12,13.55V5Q12,4.175 12.588,3.587Q13.175,3 14,3H16Q16.825,3 17.413,3.587Q18,4.175 18,5Q18,5.825 17.413,6.412Q16.825,7 16,7H14V17Q14,18.65 12.825,19.825Q11.65,21 10,21Z"/>
</vector> </vector>

View file

@ -4,7 +4,7 @@
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24" android:viewportHeight="24"
android:tint="?attr/colorControlNormal"> android:tint="?attr/colorControlNormal">
<path <path
android:fillColor="@android:color/white" android:fillColor="@android:color/white"
android:pathData="M19.35,10.04C18.67,6.59 15.64,4 12,4 9.11,4 6.6,5.64 5.35,8.04 2.34,8.36 0,10.91 0,14c0,3.31 2.69,6 6,6h13c2.76,0 5,-2.24 5,-5 0,-2.64 -2.05,-4.78 -4.65,-4.96zM14,13v4h-4v-4H7l5,-5 5,5h-3z" /> android:pathData="M6.5,20Q4.225,20 2.613,18.425Q1,16.85 1,14.575Q1,12.625 2.175,11.1Q3.35,9.575 5.25,9.15Q5.875,6.85 7.75,5.425Q9.625,4 12,4Q14.925,4 16.962,6.037Q19,8.075 19,11Q20.725,11.2 21.863,12.487Q23,13.775 23,15.5Q23,17.375 21.688,18.688Q20.375,20 18.5,20H13Q12.175,20 11.588,19.413Q11,18.825 11,18V12.8L10.1,13.7Q9.825,13.975 9.4,13.975Q8.975,13.975 8.7,13.7Q8.425,13.425 8.425,13Q8.425,12.575 8.7,12.3L11.3,9.7Q11.45,9.55 11.625,9.487Q11.8,9.425 12,9.425Q12.2,9.425 12.375,9.487Q12.55,9.55 12.7,9.7L15.3,12.3Q15.575,12.575 15.575,13Q15.575,13.425 15.3,13.7Q15.025,13.975 14.6,13.975Q14.175,13.975 13.9,13.7L13,12.8V18Q13,18 13,18Q13,18 13,18H18.5Q19.55,18 20.275,17.275Q21,16.55 21,15.5Q21,14.45 20.275,13.725Q19.55,13 18.5,13H17V11Q17,8.925 15.538,7.462Q14.075,6 12,6Q9.925,6 8.463,7.462Q7,8.925 7,11H6.5Q5.05,11 4.025,12.025Q3,13.05 3,14.5Q3,15.95 4.025,16.975Q5.05,18 6.5,18H8Q8.425,18 8.713,18.288Q9,18.575 9,19Q9,19.425 8.713,19.712Q8.425,20 8,20ZM12,13Q12,13 12,13Q12,13 12,13Q12,13 12,13Q12,13 12,13Q12,13 12,13Q12,13 12,13Q12,13 12,13Q12,13 12,13Q12,13 12,13Q12,13 12,13Q12,13 12,13Q12,13 12,13Q12,13 12,13Q12,13 12,13Q12,13 12,13Q12,13 12,13Q12,13 12,13Q12,13 12,13Q12,13 12,13Q12,13 12,13Q12,13 12,13Q12,13 12,13Z"/>
</vector> </vector>

View file

@ -1,5 +0,0 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M20,4L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM15,18L4,18v-4h11v4zM15,13L4,13L4,9h11v4zM20,18h-4L16,9h4v9z"/>
</vector>

View file

@ -1,9 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/md_white_1000"
android:pathData="M9.5 3C7.56 3 5.85 4.24 5.23 6.08C3.36 6.44 2 8.09 2 10C2 12.21 3.79 14 6 14V22H17V20H20C20.55 20 21 19.55 21 19V11C21 10.45 20.55 10 20 10H18V8C18 5.79 16.21 4 14 4H12.32C11.5 3.35 10.53 3 9.5 3M9.5 5C10.29 5 11.03 5.37 11.5 6H14C15.11 6 16 6.9 16 8H12C10 8 9.32 9.13 8.5 10.63C7.68 12.13 6 12 6 12C4.89 12 4 11.11 4 10C4 8.9 4.89 8 6 8H7V7.5C7 6.12 8.12 5 9.5 5M17 12H19V18H17Z" />
</vector>

View file

@ -1,5 +1,10 @@
<vector android:height="24dp" android:tint="#000000" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:viewportHeight="24" android:viewportWidth="24" android:width="24dp"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> android:height="24dp"
<path android:fillColor="@android:color/white" android:pathData="M6,13c0.55,-0.55 0.55,-1.44 0,-1.99L6,11c-0.55,-0.55 -1.45,-0.55 -2,0s-0.55,1.45 0,2 1.45,0.55 2,0zM20,11c-0.56,-0.56 -1.45,-0.56 -2,-0.01L18,11c-0.55,0.55 -0.55,1.44 0,1.99L18,13c0.55,0.55 1.44,0.55 1.99,0L20,13c0.55,-0.55 0.55,-1.45 0,-2zM17,7l-4.29,-4.29c-0.63,-0.63 -1.71,-0.19 -1.71,0.7v6.18L7.11,5.7c-0.39,-0.39 -1.02,-0.39 -1.41,0 -0.39,0.39 -0.39,1.02 0,1.41L10.59,12 5.7,16.89c-0.39,0.39 -0.39,1.02 0,1.41 0.39,0.39 1.02,0.39 1.41,0L11,14.41v6.18c0,0.89 1.08,1.34 1.71,0.71L17,17c0.39,-0.39 0.39,-1.02 0,-1.42L13.41,12 17,8.42c0.39,-0.39 0.39,-1.03 0,-1.42zM14.88,16.29L13,18.17v-3.76l1.88,1.88zM13,9.59L13,5.83l1.88,1.88L13,9.59z"/> android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M5,13.5Q4.375,13.5 3.938,13.062Q3.5,12.625 3.5,12Q3.5,11.375 3.938,10.938Q4.375,10.5 5,10.5Q5.625,10.5 6.062,10.938Q6.5,11.375 6.5,12Q6.5,12.625 6.062,13.062Q5.625,13.5 5,13.5ZM19,13.5Q18.375,13.5 17.938,13.062Q17.5,12.625 17.5,12Q17.5,11.375 17.938,10.938Q18.375,10.5 19,10.5Q19.625,10.5 20.062,10.938Q20.5,11.375 20.5,12Q20.5,12.625 20.062,13.062Q19.625,13.5 19,13.5ZM11,14.4 L7.1,18.3Q6.825,18.575 6.4,18.575Q5.975,18.575 5.7,18.3Q5.425,18.025 5.425,17.6Q5.425,17.175 5.7,16.9L10.6,12L5.7,7.1Q5.425,6.825 5.425,6.4Q5.425,5.975 5.7,5.7Q5.975,5.425 6.4,5.425Q6.825,5.425 7.1,5.7L11,9.6V3.425Q11,3 11.262,2.725Q11.525,2.45 11.925,2.45Q12.175,2.45 12.425,2.562Q12.675,2.675 12.875,2.875L17,7Q17.15,7.15 17.213,7.325Q17.275,7.5 17.275,7.7Q17.275,7.9 17.213,8.075Q17.15,8.25 17,8.4L13.4,12L17,15.6Q17.15,15.75 17.213,15.925Q17.275,16.1 17.275,16.3Q17.275,16.5 17.213,16.675Q17.15,16.85 17,17L12.875,21.125Q12.675,21.325 12.425,21.438Q12.175,21.55 11.925,21.55Q11.525,21.55 11.262,21.275Q11,21 11,20.575ZM13,9.6 L14.9,7.7 13,5.85ZM13,18.15 L14.9,16.3 13,14.4Z"/>
</vector> </vector>

View file

@ -1,24 +1,10 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path <path
android:fillColor="@color/md_white_1000" android:fillColor="@android:color/white"
android:pathData="M6 13c-0.55 0-1 0.45-1 1s0.45 1 1 1 1-0.45 1-1-0.45-1-1-1zm0 4c-0.55 0-1 0.45-1 1s0.45 1 1 1 1-0.45 1-1-0.45-1-1-1zm0-8c-0.55 0-1 0.45-1 1s0.45 1 1 1 1-0.45 1-1-0.45-1-1-1zm-3 0.5c-0.28 0-0.5 0.22 -0.5 0.5 s0.22 0.5 0.5 0.5 0.5-0.22 0.5 -0.5-0.22-0.5-0.5-0.5zM6 5c-0.55 0-1 0.45-1 1s0.45 1 1 1 1-0.45 1-1-0.45-1-1-1zm15 5.5c0.28 0 0.5-0.22 0.5 -0.5s-0.22-0.5-0.5-0.5-0.5 0.22 -0.5 0.5 0.22 0.5 0.5 0.5 zM14 7c0.55 0 1-0.45 1-1s-0.45-1-1-1-1 0.45-1 1 0.45 1 1 1zm0-3.5c0.28 0 0.5-0.22 0.5 -0.5s-0.22-0.5-0.5-0.5-0.5 0.22 -0.5 0.5 0.22 0.5 0.5 0.5 zm-11 10c-0.28 0-0.5 0.22 -0.5 0.5 s0.22 0.5 0.5 0.5 0.5-0.22 0.5 -0.5-0.22-0.5-0.5-0.5zm7 7c-0.28 0-0.5 0.22 -0.5 0.5 s0.22 0.5 0.5 0.5 0.5-0.22 0.5 -0.5-0.22-0.5-0.5-0.5zm0-17c0.28 0 0.5-0.22 0.5 -0.5s-0.22-0.5-0.5-0.5-0.5 0.22 -0.5 0.5 0.22 0.5 0.5 0.5 zM10 7c0.55 0 1-0.45 1-1s-0.45-1-1-1-1 0.45-1 1 0.45 1 1 1zm0 5.5c-0.83 0-1.5 0.67 -1.5 1.5s0.67 1.5 1.5 1.5 1.5-0.67 1.5-1.5-0.67-1.5-1.5-1.5zm8 0.5c-0.55 0-1 0.45-1 1s0.45 1 1 1 1-0.45 1-1-0.45-1-1-1zm0 4c-0.55 0-1 0.45-1 1s0.45 1 1 1 1-0.45 1-1-0.45-1-1-1zm0-8c-0.55 0-1 0.45-1 1s0.45 1 1 1 1-0.45 1-1-0.45-1-1-1zm0-4c-0.55 0-1 0.45-1 1s0.45 1 1 1 1-0.45 1-1-0.45-1-1-1zm3 8.5c-0.28 0-0.5 0.22 -0.5 0.5 s0.22 0.5 0.5 0.5 0.5-0.22 0.5 -0.5-0.22-0.5-0.5-0.5zM14 17c-0.55 0-1 0.45-1 1s0.45 1 1 1 1-0.45 1-1-0.45-1-1-1zm0 3.5c-0.28 0-0.5 0.22 -0.5 0.5 s0.22 0.5 0.5 0.5 0.5-0.22 0.5 -0.5-0.22-0.5-0.5-0.5zm-4-12c-0.83 0-1.5 0.67 -1.5 1.5s0.67 1.5 1.5 1.5 1.5-0.67 1.5-1.5-0.67-1.5-1.5-1.5zm0 8.5c-0.55 0-1 0.45-1 1s0.45 1 1 1 1-0.45 1-1-0.45-1-1-1zm4-4.5c-0.83 0-1.5 0.67 -1.5 1.5s0.67 1.5 1.5 1.5 1.5-0.67 1.5-1.5-0.67-1.5-1.5-1.5zm0-4c-0.83 0-1.5 0.67 -1.5 1.5s0.67 1.5 1.5 1.5 1.5-0.67 1.5-1.5-0.67-1.5-1.5-1.5z" /> android:pathData="M3,14.5Q2.8,14.5 2.65,14.35Q2.5,14.2 2.5,14Q2.5,13.8 2.65,13.65Q2.8,13.5 3,13.5Q3.2,13.5 3.35,13.65Q3.5,13.8 3.5,14Q3.5,14.2 3.35,14.35Q3.2,14.5 3,14.5ZM3,10.5Q2.8,10.5 2.65,10.35Q2.5,10.2 2.5,10Q2.5,9.8 2.65,9.65Q2.8,9.5 3,9.5Q3.2,9.5 3.35,9.65Q3.5,9.8 3.5,10Q3.5,10.2 3.35,10.35Q3.2,10.5 3,10.5ZM6,19Q5.575,19 5.287,18.712Q5,18.425 5,18Q5,17.575 5.287,17.288Q5.575,17 6,17Q6.425,17 6.713,17.288Q7,17.575 7,18Q7,18.425 6.713,18.712Q6.425,19 6,19ZM6,15Q5.575,15 5.287,14.712Q5,14.425 5,14Q5,13.575 5.287,13.287Q5.575,13 6,13Q6.425,13 6.713,13.287Q7,13.575 7,14Q7,14.425 6.713,14.712Q6.425,15 6,15ZM6,11Q5.575,11 5.287,10.712Q5,10.425 5,10Q5,9.575 5.287,9.287Q5.575,9 6,9Q6.425,9 6.713,9.287Q7,9.575 7,10Q7,10.425 6.713,10.712Q6.425,11 6,11ZM6,7Q5.575,7 5.287,6.713Q5,6.425 5,6Q5,5.575 5.287,5.287Q5.575,5 6,5Q6.425,5 6.713,5.287Q7,5.575 7,6Q7,6.425 6.713,6.713Q6.425,7 6,7ZM10,15.5Q9.375,15.5 8.938,15.062Q8.5,14.625 8.5,14Q8.5,13.375 8.938,12.938Q9.375,12.5 10,12.5Q10.625,12.5 11.062,12.938Q11.5,13.375 11.5,14Q11.5,14.625 11.062,15.062Q10.625,15.5 10,15.5ZM10,11.5Q9.375,11.5 8.938,11.062Q8.5,10.625 8.5,10Q8.5,9.375 8.938,8.938Q9.375,8.5 10,8.5Q10.625,8.5 11.062,8.938Q11.5,9.375 11.5,10Q11.5,10.625 11.062,11.062Q10.625,11.5 10,11.5ZM10,19Q9.575,19 9.288,18.712Q9,18.425 9,18Q9,17.575 9.288,17.288Q9.575,17 10,17Q10.425,17 10.713,17.288Q11,17.575 11,18Q11,18.425 10.713,18.712Q10.425,19 10,19ZM10,7Q9.575,7 9.288,6.713Q9,6.425 9,6Q9,5.575 9.288,5.287Q9.575,5 10,5Q10.425,5 10.713,5.287Q11,5.575 11,6Q11,6.425 10.713,6.713Q10.425,7 10,7ZM10,21.5Q9.8,21.5 9.65,21.35Q9.5,21.2 9.5,21Q9.5,20.8 9.65,20.65Q9.8,20.5 10,20.5Q10.2,20.5 10.35,20.65Q10.5,20.8 10.5,21Q10.5,21.2 10.35,21.35Q10.2,21.5 10,21.5ZM10,3.5Q9.8,3.5 9.65,3.35Q9.5,3.2 9.5,3Q9.5,2.8 9.65,2.65Q9.8,2.5 10,2.5Q10.2,2.5 10.35,2.65Q10.5,2.8 10.5,3Q10.5,3.2 10.35,3.35Q10.2,3.5 10,3.5ZM14,15.5Q13.375,15.5 12.938,15.062Q12.5,14.625 12.5,14Q12.5,13.375 12.938,12.938Q13.375,12.5 14,12.5Q14.625,12.5 15.062,12.938Q15.5,13.375 15.5,14Q15.5,14.625 15.062,15.062Q14.625,15.5 14,15.5ZM14,11.5Q13.375,11.5 12.938,11.062Q12.5,10.625 12.5,10Q12.5,9.375 12.938,8.938Q13.375,8.5 14,8.5Q14.625,8.5 15.062,8.938Q15.5,9.375 15.5,10Q15.5,10.625 15.062,11.062Q14.625,11.5 14,11.5ZM14,19Q13.575,19 13.288,18.712Q13,18.425 13,18Q13,17.575 13.288,17.288Q13.575,17 14,17Q14.425,17 14.713,17.288Q15,17.575 15,18Q15,18.425 14.713,18.712Q14.425,19 14,19ZM14,7Q13.575,7 13.288,6.713Q13,6.425 13,6Q13,5.575 13.288,5.287Q13.575,5 14,5Q14.425,5 14.713,5.287Q15,5.575 15,6Q15,6.425 14.713,6.713Q14.425,7 14,7ZM14,21.5Q13.8,21.5 13.65,21.35Q13.5,21.2 13.5,21Q13.5,20.8 13.65,20.65Q13.8,20.5 14,20.5Q14.2,20.5 14.35,20.65Q14.5,20.8 14.5,21Q14.5,21.2 14.35,21.35Q14.2,21.5 14,21.5ZM14,3.5Q13.8,3.5 13.65,3.35Q13.5,3.2 13.5,3Q13.5,2.8 13.65,2.65Q13.8,2.5 14,2.5Q14.2,2.5 14.35,2.65Q14.5,2.8 14.5,3Q14.5,3.2 14.35,3.35Q14.2,3.5 14,3.5ZM18,19Q17.575,19 17.288,18.712Q17,18.425 17,18Q17,17.575 17.288,17.288Q17.575,17 18,17Q18.425,17 18.712,17.288Q19,17.575 19,18Q19,18.425 18.712,18.712Q18.425,19 18,19ZM18,15Q17.575,15 17.288,14.712Q17,14.425 17,14Q17,13.575 17.288,13.287Q17.575,13 18,13Q18.425,13 18.712,13.287Q19,13.575 19,14Q19,14.425 18.712,14.712Q18.425,15 18,15ZM18,11Q17.575,11 17.288,10.712Q17,10.425 17,10Q17,9.575 17.288,9.287Q17.575,9 18,9Q18.425,9 18.712,9.287Q19,9.575 19,10Q19,10.425 18.712,10.712Q18.425,11 18,11ZM18,7Q17.575,7 17.288,6.713Q17,6.425 17,6Q17,5.575 17.288,5.287Q17.575,5 18,5Q18.425,5 18.712,5.287Q19,5.575 19,6Q19,6.425 18.712,6.713Q18.425,7 18,7ZM21,14.5Q20.8,14.5 20.65,14.35Q20.5,14.2 20.5,14Q20.5,13.8 20.65,13.65Q20.8,13.5 21,13.5Q21.2,13.5 21.35,13.65Q21.5,13.8 21.5,14Q21.5,14.2 21.35,14.35Q21.2,14.5 21,14.5ZM21,10.5Q20.8,10.5 20.65,10.35Q20.5,10.2 20.5,10Q20.5,9.8 20.65,9.65Q20.8,9.5 21,9.5Q21.2,9.5 21.35,9.65Q21.5,9.8 21.5,10Q21.5,10.2 21.35,10.35Q21.2,10.5 21,10.5Z"/>
</vector> </vector>

View file

@ -1,12 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
<path android:fillColor="@android:color/white"
android:fillColor="@color/md_white_1000" android:pathData="M12,21Q10.375,21 8.988,20.2Q7.6,19.4 6.8,18H4.975Q4.55,18 4.275,17.712Q4,17.425 4,17Q4,16.575 4.287,16.288Q4.575,16 5,16H6.1Q6.025,15.5 6.013,15Q6,14.5 6,14H4.975Q4.55,14 4.275,13.712Q4,13.425 4,13Q4,12.575 4.287,12.287Q4.575,12 5,12H6Q6,11.5 6.013,11Q6.025,10.5 6.1,10H4.975Q4.55,10 4.275,9.712Q4,9.425 4,9Q4,8.575 4.287,8.287Q4.575,8 5,8H6.8Q7.15,7.425 7.588,6.925Q8.025,6.425 8.6,6.05L7.675,5.1Q7.4,4.8 7.413,4.387Q7.425,3.975 7.7,3.7Q7.975,3.425 8.4,3.425Q8.825,3.425 9.1,3.7L10.55,5.15Q11.25,4.925 11.975,4.925Q12.7,4.925 13.4,5.15L14.9,3.675Q15.2,3.4 15.613,3.412Q16.025,3.425 16.3,3.7Q16.575,3.975 16.575,4.4Q16.575,4.825 16.3,5.1L15.35,6.05Q15.925,6.425 16.388,6.912Q16.85,7.4 17.2,8H19.025Q19.45,8 19.725,8.287Q20,8.575 20,9Q20,9.425 19.712,9.712Q19.425,10 19,10H17.9Q17.975,10.5 17.988,11Q18,11.5 18,12H19.025Q19.45,12 19.725,12.287Q20,12.575 20,13Q20,13.425 19.712,13.712Q19.425,14 19,14H18Q18,14.5 17.988,15Q17.975,15.5 17.9,16H19.025Q19.45,16 19.725,16.288Q20,16.575 20,17Q20,17.425 19.712,17.712Q19.425,18 19,18H17.2Q16.4,19.4 15.013,20.2Q13.625,21 12,21ZM12,19Q13.65,19 14.825,17.825Q16,16.65 16,15V11Q16,9.35 14.825,8.175Q13.65,7 12,7Q10.35,7 9.175,8.175Q8,9.35 8,11V15Q8,16.65 9.175,17.825Q10.35,19 12,19ZM11,16H13.025Q13.45,16 13.725,15.712Q14,15.425 14,15Q14,14.575 13.713,14.287Q13.425,14 13,14H10.975Q10.55,14 10.275,14.287Q10,14.575 10,15Q10,15.425 10.288,15.712Q10.575,16 11,16ZM11,12H13.025Q13.45,12 13.725,11.712Q14,11.425 14,11Q14,10.575 13.713,10.287Q13.425,10 13,10H10.975Q10.55,10 10.275,10.287Q10,10.575 10,11Q10,11.425 10.288,11.712Q10.575,12 11,12ZM12,13Q12,13 12,13Q12,13 12,13Q12,13 12,13Q12,13 12,13Q12,13 12,13Q12,13 12,13Q12,13 12,13Q12,13 12,13Z"/>
android:pathData="M20 8h-2.81c-0.45-0.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5s-0.96 0.06 -1.41 0.17 L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-0.05 0.33 -0.09 0.66 -0.09 1v1H4v2h2v1c0 0.34 0.04 0.67 0.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c0.05-0.33 0.09 -0.66 0.09 -1v-1h2v-2h-2v-1c0-0.34-0.04-0.67-0.09-1H20V8zm-4 4v3c0 0.22-0.03 0.47 -0.07 0.7 l-0.1 0.65 -0.37 0.65 c-0.72 1.24-2.04 2-3.46 2s-2.74-0.77-3.46-2l-0.37-0.64-0.1-0.65C8.03 15.48 8 15.23 8 15v-4c0-0.23 0.03 -0.48 0.07 -0.7l0.1-0.65 0.37 -0.65c0.3-0.52 0.72 -0.97 1.21-1.31l0.57-0.39 0.74 -0.18c0.31-0.08 0.63 -0.12 0.94 -0.12 0.32 0 0.63 0.04 0.95 0.12 l0.68 0.16 0.61 0.42 c0.5 0.34 0.91 0.78 1.21 1.31l0.38 0.65 0.1 0.65 c0.04 0.22 0.07 0.47 0.07 0.69 v1zm-6 2h4v2h-4zm0-4h4v2h-4z" /> </vector>
</vector>

View file

@ -1,5 +1,10 @@
<vector android:height="24dp" android:tint="#FFFFFF" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:viewportHeight="24" android:viewportWidth="24" android:width="24dp"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> android:height="24dp"
<path android:fillColor="@android:color/white" android:pathData="M18.92,6.01C18.72,5.42 18.16,5 17.5,5h-11c-0.66,0 -1.21,0.42 -1.42,1.01L3,12v8c0,0.55 0.45,1 1,1h1c0.55,0 1,-0.45 1,-1v-1h12v1c0,0.55 0.45,1 1,1h1c0.55,0 1,-0.45 1,-1v-8l-2.08,-5.99zM6.5,16c-0.83,0 -1.5,-0.67 -1.5,-1.5S5.67,13 6.5,13s1.5,0.67 1.5,1.5S7.33,16 6.5,16zM17.5,16c-0.83,0 -1.5,-0.67 -1.5,-1.5s0.67,-1.5 1.5,-1.5 1.5,0.67 1.5,1.5 -0.67,1.5 -1.5,1.5zM5,11l1.5,-4.5h11L19,11L5,11z"/> android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M6,19V19.525Q6,20.15 5.575,20.575Q5.15,21 4.5,21Q3.875,21 3.438,20.562Q3,20.125 3,19.5V12L5.1,6Q5.25,5.55 5.638,5.275Q6.025,5 6.5,5H17.5Q17.975,5 18.363,5.275Q18.75,5.55 18.9,6L21,12V19.525Q21,20.15 20.575,20.575Q20.15,21 19.5,21Q18.875,21 18.438,20.562Q18,20.125 18,19.5V19ZM5.8,10H18.2L17.15,7H6.85ZM7.5,16Q8.125,16 8.562,15.562Q9,15.125 9,14.5Q9,13.875 8.562,13.438Q8.125,13 7.5,13Q6.875,13 6.438,13.438Q6,13.875 6,14.5Q6,15.125 6.438,15.562Q6.875,16 7.5,16ZM16.5,16Q17.125,16 17.562,15.562Q18,15.125 18,14.5Q18,13.875 17.562,13.438Q17.125,13 16.5,13Q15.875,13 15.438,13.438Q15,13.875 15,14.5Q15,15.125 15.438,15.562Q15.875,16 16.5,16Z"/>
</vector> </vector>

View file

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2020 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/md_white_1000"
android:pathData="M20 6h-2.18c0.11-0.31 0.18 -0.65 0.18 -1 0-1.66-1.34-3-3-3-1.05 0-1.96 0.54 -2.5 1.35l-0.5 0.67 -0.5-0.68C10.96 2.54 10.05 2 9 2 7.34 2 6 3.34 6 5c0 0.35 0.07 0.69 0.18 1H4c-1.11 0-1.99 0.89 -1.99 2L2 19c0 1.11 0.89 2 2 2h16c1.11 0 2-0.89 2-2V8c0-1.11-0.89-2-2-2zm-5-2c0.55 0 1 0.45 1 1s-0.45 1-1 1-1-0.45-1-1 0.45-1 1-1zM9 4c0.55 0 1 0.45 1 1s-0.45 1-1 1-1-0.45-1-1 0.45-1 1-1zm11 15H4v-2h16v2zm0-5H4V8h5.08L7 10.83 8.62 12 12 7.4l3.38 4.6L17 10.83 14.92 8H20v6z" />
</vector>

View file

@ -1,24 +0,0 @@
<!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<!-- drawable/cellphone.xml -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/md_white_1000"
android:pathData="M17,19H7V5H17M17,1H7C5.89,1 5,1.89 5,3V21A2,2 0 0,0 7,23H17A2,2 0 0,0 19,21V3C19,1.89 18.1,1 17,1Z" />
</vector>

View file

@ -1,24 +0,0 @@
<!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<!-- drawable/cellphone_lock.xml -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/md_white_1000"
android:pathData="M17,1H7A2,2 0 0,0 5,3V6H7V4H17V20H7V18H5V21A2,2 0 0,0 7,23H17A2,2 0 0,0 19,21V3A2,2 0 0,0 17,1M8.8,11V9.5C8.8,8.1 7.4,7 6,7C4.6,7 3.2,8.1 3.2,9.5V11C2.6,11 2,11.6 2,12.2V15.7C2,16.4 2.6,17 3.2,17H8.7C9.4,17 10,16.4 10,15.8V12.3C10,11.6 9.4,11 8.8,11M7.5,11H4.5V9.5C4.5,8.7 5.2,8.2 6,8.2C6.8,8.2 7.5,8.7 7.5,9.5V11Z" />
</vector>

View file

@ -1,10 +1,10 @@
<vector android:height="24dp" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:tint="#FFFFFF"
android:viewportHeight="24.0"
android:viewportWidth="24.0"
android:width="24dp" android:width="24dp"
xmlns:android="http://schemas.android.com/apk/res/android"> android:height="24dp"
<path android:viewportWidth="24"
android:fillColor="#FF000000" android:viewportHeight="24"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM10,17l-5,-5 1.41,-1.41L10,14.17l7.59,-7.59L19,8l-9,9z" /> android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M10.6,13.8 L8.425,11.625Q8.15,11.35 7.75,11.35Q7.35,11.35 7.05,11.65Q6.775,11.925 6.775,12.35Q6.775,12.775 7.05,13.05L9.9,15.9Q10.175,16.175 10.6,16.175Q11.025,16.175 11.3,15.9L16.975,10.225Q17.25,9.95 17.25,9.55Q17.25,9.15 16.95,8.85Q16.675,8.575 16.25,8.575Q15.825,8.575 15.55,8.85ZM12,22Q9.925,22 8.1,21.212Q6.275,20.425 4.925,19.075Q3.575,17.725 2.788,15.9Q2,14.075 2,12Q2,9.925 2.788,8.1Q3.575,6.275 4.925,4.925Q6.275,3.575 8.1,2.787Q9.925,2 12,2Q14.075,2 15.9,2.787Q17.725,3.575 19.075,4.925Q20.425,6.275 21.212,8.1Q22,9.925 22,12Q22,14.075 21.212,15.9Q20.425,17.725 19.075,19.075Q17.725,20.425 15.9,21.212Q14.075,22 12,22Z"/>
</vector> </vector>

View file

@ -1,23 +1,10 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2020 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24"
<path android:tint="?attr/colorControlNormal">
android:fillColor="@color/md_white_1000" <path
android:pathData="M6 13h12c0.55 0 1-0.45 1-1s-0.45-1-1-1H6c-0.55 0-1 0.45-1 1s0.45 1 1 1zm-2 4h12c0.55 0 1-0.45 1-1s-0.45-1-1-1H4c-0.55 0-1 0.45-1 1s0.45 1 1 1zm3-9c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1s-0.45-1-1-1H8c-0.55 0-1 0.45-1 1z" /> android:fillColor="@android:color/white"
</vector> android:pathData="M18,13H6Q5.575,13 5.287,12.712Q5,12.425 5,12Q5,11.575 5.287,11.287Q5.575,11 6,11H18Q18.425,11 18.712,11.287Q19,11.575 19,12Q19,12.425 18.712,12.712Q18.425,13 18,13ZM16,17H4Q3.575,17 3.288,16.712Q3,16.425 3,16Q3,15.575 3.288,15.287Q3.575,15 4,15H16Q16.425,15 16.712,15.287Q17,15.575 17,16Q17,16.425 16.712,16.712Q16.425,17 16,17ZM20,9H8Q7.575,9 7.287,8.712Q7,8.425 7,8Q7,7.575 7.287,7.287Q7.575,7 8,7H20Q20.425,7 20.712,7.287Q21,7.575 21,8Q21,8.425 20.712,8.712Q20.425,9 20,9Z"/>
</vector>

View file

@ -1,24 +1,10 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2020 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path <path
android:fillColor="@color/md_white_1000" android:fillColor="@android:color/white"
android:pathData="M18.3 5.71c-0.39-0.39-1.02-0.39-1.41 0L12 10.59 7.11 5.7c-0.39-0.39-1.02-0.39-1.41 0-0.39 0.39 -0.39 1.02 0 1.41L10.59 12 5.7 16.89c-0.39 0.39 -0.39 1.02 0 1.41 0.39 0.39 1.02 0.39 1.41 0L12 13.41l4.89 4.89c0.39 0.39 1.02 0.39 1.41 0 0.39-0.39 0.39 -1.02 0-1.41L13.41 12l4.89-4.89c0.38-0.38 0.38 -1.02 0-1.4z" /> android:pathData="M12,13.4 L7.1,18.3Q6.825,18.575 6.4,18.575Q5.975,18.575 5.7,18.3Q5.425,18.025 5.425,17.6Q5.425,17.175 5.7,16.9L10.6,12L5.7,7.1Q5.425,6.825 5.425,6.4Q5.425,5.975 5.7,5.7Q5.975,5.425 6.4,5.425Q6.825,5.425 7.1,5.7L12,10.6L16.9,5.7Q17.175,5.425 17.6,5.425Q18.025,5.425 18.3,5.7Q18.575,5.975 18.575,6.4Q18.575,6.825 18.3,7.1L13.4,12L18.3,16.9Q18.575,17.175 18.575,17.6Q18.575,18.025 18.3,18.3Q18.025,18.575 17.6,18.575Q17.175,18.575 16.9,18.3Z"/>
</vector> </vector>

View file

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/md_white_1000"
android:pathData="M12 22C6.49 22 2 17.51 2 12S6.49 2 12 2s10 4.04 10 9c0 3.31-2.69 6-6 6h-1.77c-0.28 0-0.5 0.22 -0.5 0.5 0 0.12 0.05 0.23 0.13 0.33 0.41 0.47 0.64 1.06 0.64 1.67 0 1.38-1.12 2.5-2.5 2.5zm0-18c-4.41 0-8 3.59-8 8s3.59 8 8 8c0.28 0 0.5-0.22 0.5 -0.5 0-0.16-0.08-0.28-0.14-0.35-0.41-0.46-0.63-1.05-0.63-1.65 0-1.38 1.12-2.5 2.5-2.5H16c2.21 0 4-1.79 4-4 0-3.86-3.59-7-8-7z" />
<path
android:fillColor="@color/md_white_1000"
android:pathData="M 6.5 10 C 7.32842712475 10 8 10.6715728753 8 11.5 C 8 12.3284271247 7.32842712475 13 6.5 13 C 5.67157287525 13 5 12.3284271247 5 11.5 C 5 10.6715728753 5.67157287525 10 6.5 10 Z" />
<path
android:fillColor="@color/md_white_1000"
android:pathData="M 9.5 6 C 10.3284271247 6 11 6.67157287525 11 7.5 C 11 8.32842712475 10.3284271247 9 9.5 9 C 8.67157287525 9 8 8.32842712475 8 7.5 C 8 6.67157287525 8.67157287525 6 9.5 6 Z" />
<path
android:fillColor="@color/md_white_1000"
android:pathData="M 14.5 6 C 15.3284271247 6 16 6.67157287525 16 7.5 C 16 8.32842712475 15.3284271247 9 14.5 9 C 13.6715728753 9 13 8.32842712475 13 7.5 C 13 6.67157287525 13.6715728753 6 14.5 6 Z" />
<path
android:fillColor="@color/md_white_1000"
android:pathData="M 17.5 10 C 18.3284271247 10 19 10.6715728753 19 11.5 C 19 12.3284271247 18.3284271247 13 17.5 13 C 16.6715728753 13 16 12.3284271247 16 11.5 C 16 10.6715728753 16.6715728753 10 17.5 10 Z" />
</vector>

View file

@ -1,25 +1,10 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path android:pathData="M0 0h24v24H0V0z" /> <path
<path android:fillColor="@android:color/white"
android:fillColor="@color/md_white_1000" android:pathData="M4,21Q3.575,21 3.288,20.712Q3,20.425 3,20V16.675Q3,16.475 3.075,16.288Q3.15,16.1 3.3,15.95L11.95,7.3L11.2,6.55Q10.925,6.275 10.925,5.85Q10.925,5.425 11.225,5.125Q11.5,4.85 11.925,4.85Q12.35,4.85 12.65,5.125L13.825,6.325L16.9,3.25Q17.175,2.975 17.6,2.975Q18.025,2.975 18.3,3.25L20.7,5.65Q20.975,5.925 20.975,6.35Q20.975,6.775 20.7,7.05L17.625,10.125L18.875,11.375Q19.15,11.65 19.15,12.075Q19.15,12.5 18.875,12.775Q18.575,13.075 18.15,13.075Q17.725,13.075 17.45,12.775L16.7,12.05L8.05,20.7Q7.9,20.85 7.713,20.925Q7.525,21 7.325,21ZM5,19H6.95L15.25,10.65L13.35,8.75L5,17.05Z"/>
android:pathData="M17.66 5.41l0.92 0.92 -2.69 2.69-0.92-0.92 2.69-2.69M17.67 3c-0.26 0-0.51 0.1 -0.71 0.29 l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3.12c0.4-0.4 0.4 -1.03 0.01 -1.42l-2.34-2.34c-0.2-0.19-0.45-0.29-0.7-0.29zM6.92 19L5 17.08l8.06-8.06 1.92 1.92L6.92 19z" /> </vector>
</vector>

View file

@ -1,9 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M12,3A9,9 0,0 0,3 12A9,9 0,0 0,12 21A9,9 0,0 0,21 12C21,11.5 20.96,11 20.87,10.5C20.6,10 20,10 20,10H18V9C18,8 17,8 17,8H15V7C15,6 14,6 14,6H13V4C13,3 12,3 12,3M9.5,6A1.5,1.5 0,0 1,11 7.5A1.5,1.5 0,0 1,9.5 9A1.5,1.5 0,0 1,8 7.5A1.5,1.5 0,0 1,9.5 6M6.5,10A1.5,1.5 0,0 1,8 11.5A1.5,1.5 0,0 1,6.5 13A1.5,1.5 0,0 1,5 11.5A1.5,1.5 0,0 1,6.5 10M11.5,11A1.5,1.5 0,0 1,13 12.5A1.5,1.5 0,0 1,11.5 14A1.5,1.5 0,0 1,10 12.5A1.5,1.5 0,0 1,11.5 11M16.5,13A1.5,1.5 0,0 1,18 14.5A1.5,1.5 0,0 1,16.5 16H16.5A1.5,1.5 0,0 1,15 14.5H15A1.5,1.5 0,0 1,16.5 13M11,16A1.5,1.5 0,0 1,12.5 17.5A1.5,1.5 0,0 1,11 19A1.5,1.5 0,0 1,9.5 17.5A1.5,1.5 0,0 1,11 16Z" />
</vector>

View file

@ -1,13 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24"
<path android:tint="?attr/colorControlNormal">
android:fillColor="@color/md_white_1000" <path
android:pathData="M15 4V3H9v1H4v2h1v13c0 1.1 0.9 2 2 2h10c1.1 0 2-0.9 2-2V6h1V4h-5zm2 15H7V6h10v13z" /> android:fillColor="@android:color/white"
<path android:pathData="M7,21Q6.175,21 5.588,20.413Q5,19.825 5,19V6Q4.575,6 4.287,5.713Q4,5.425 4,5Q4,4.575 4.287,4.287Q4.575,4 5,4H9Q9,3.575 9.288,3.287Q9.575,3 10,3H14Q14.425,3 14.713,3.287Q15,3.575 15,4H19Q19.425,4 19.712,4.287Q20,4.575 20,5Q20,5.425 19.712,5.713Q19.425,6 19,6V19Q19,19.825 18.413,20.413Q17.825,21 17,21ZM7,6V19Q7,19 7,19Q7,19 7,19H17Q17,19 17,19Q17,19 17,19V6ZM9,16Q9,16.425 9.288,16.712Q9.575,17 10,17Q10.425,17 10.713,16.712Q11,16.425 11,16V9Q11,8.575 10.713,8.287Q10.425,8 10,8Q9.575,8 9.288,8.287Q9,8.575 9,9ZM13,16Q13,16.425 13.288,16.712Q13.575,17 14,17Q14.425,17 14.713,16.712Q15,16.425 15,16V9Q15,8.575 14.713,8.287Q14.425,8 14,8Q13.575,8 13.288,8.287Q13,8.575 13,9ZM7,6V19Q7,19 7,19Q7,19 7,19Q7,19 7,19Q7,19 7,19V6Z"/>
android:fillColor="@color/md_white_1000" </vector>
android:pathData="M9 8h2v9H9zm4 0h2v9h-2z" />
</vector>

View file

@ -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="M12,19.875Q11.575,19.875 11.175,19.688Q10.775,19.5 10.475,19.15L2.825,10Q2.45,9.55 2.375,8.95Q2.3,8.35 2.575,7.825L4.45,4.1Q4.725,3.6 5.188,3.3Q5.65,3 6.225,3H17.775Q18.35,3 18.812,3.3Q19.275,3.6 19.55,4.1L21.425,7.825Q21.7,8.35 21.625,8.95Q21.55,9.55 21.175,10L13.525,19.15Q13.225,19.5 12.825,19.688Q12.425,19.875 12,19.875ZM9.625,8H14.375L12.875,5H11.125ZM11,16.675V10H5.45ZM13,16.675 L18.55,10H13ZM16.6,8H19.25L17.75,5Q17.75,5 17.75,5Q17.75,5 17.75,5H15.1ZM4.75,8H7.4L8.9,5H6.25Q6.25,5 6.25,5Q6.25,5 6.25,5Z"/>
</vector>

View file

@ -1,26 +0,0 @@
<!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<!-- drawable/diamond_stone.xml -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/md_white_1000"
android:pathData="M16,9H19L14,16M10,9H14L12,17M5,9H8L10,16M15,4H17L19,7H16M11,4H13L14,7H10M7,4H9L8,7H5M6,2L2,8L12,22L22,8L18,2H6Z" />
</vector>

View file

@ -6,5 +6,5 @@
android:tint="?attr/colorControlNormal"> android:tint="?attr/colorControlNormal">
<path <path
android:fillColor="@android:color/white" android:fillColor="@android:color/white"
android:pathData="M20,9H4v2h16V9zM4,15h16v-2H4V15z"/> android:pathData="M5,11Q4.575,11 4.287,10.712Q4,10.425 4,10Q4,9.575 4.287,9.287Q4.575,9 5,9H19Q19.425,9 19.712,9.287Q20,9.575 20,10Q20,10.425 19.712,10.712Q19.425,11 19,11ZM5,15Q4.575,15 4.287,14.712Q4,14.425 4,14Q4,13.575 4.287,13.287Q4.575,13 5,13H19Q19.425,13 19.712,13.287Q20,13.575 20,14Q20,14.425 19.712,14.712Q19.425,15 19,15Z"/>
</vector> </vector>

View file

@ -1,24 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path android:pathData="M0,0h24v24H0V0z" /> <path
<path android:fillColor="@android:color/white"
android:fillColor="@color/md_white_1000" android:pathData="M9,20Q8.175,20 7.588,19.413Q7,18.825 7,18Q7,17.175 7.588,16.587Q8.175,16 9,16Q9.825,16 10.413,16.587Q11,17.175 11,18Q11,18.825 10.413,19.413Q9.825,20 9,20ZM15,20Q14.175,20 13.588,19.413Q13,18.825 13,18Q13,17.175 13.588,16.587Q14.175,16 15,16Q15.825,16 16.413,16.587Q17,17.175 17,18Q17,18.825 16.413,19.413Q15.825,20 15,20ZM9,14Q8.175,14 7.588,13.412Q7,12.825 7,12Q7,11.175 7.588,10.587Q8.175,10 9,10Q9.825,10 10.413,10.587Q11,11.175 11,12Q11,12.825 10.413,13.412Q9.825,14 9,14ZM15,14Q14.175,14 13.588,13.412Q13,12.825 13,12Q13,11.175 13.588,10.587Q14.175,10 15,10Q15.825,10 16.413,10.587Q17,11.175 17,12Q17,12.825 16.413,13.412Q15.825,14 15,14ZM9,8Q8.175,8 7.588,7.412Q7,6.825 7,6Q7,5.175 7.588,4.588Q8.175,4 9,4Q9.825,4 10.413,4.588Q11,5.175 11,6Q11,6.825 10.413,7.412Q9.825,8 9,8ZM15,8Q14.175,8 13.588,7.412Q13,6.825 13,6Q13,5.175 13.588,4.588Q14.175,4 15,4Q15.825,4 16.413,4.588Q17,5.175 17,6Q17,6.825 16.413,7.412Q15.825,8 15,8Z"/>
android:pathData="M11,18c0,1.1-0.9,2-2,2s-2-0.9-2-2s0.9-2,2-2S11,16.9,11,18z M9,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S10.1,10,9,10z M9,4C7.9,4,7,4.9,7,6s0.9,2,2,2s2-0.9,2-2S10.1,4,9,4z M15,8c1.1,0,2-0.9,2-2s-0.9-2-2-2s-2,0.9-2,2S13.9,8,15,8z M15,10 c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S16.1,10,15,10z M15,16c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S16.1,16,15,16z" /> </vector>
<path
android:fillColor="@color/md_white_1000"
android:pathData="M11,18c0,1.1-0.9,2-2,2s-2-0.9-2-2s0.9-2,2-2S11,16.9,11,18z M9,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2 S10.1,10,9,10z M9,4C7.9,4,7,4.9,7,6s0.9,2,2,2s2-0.9,2-2S10.1,4,9,4z M15,8c1.1,0,2-0.9,2-2s-0.9-2-2-2s-2,0.9-2,2S13.9,8,15,8z M15,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S16.1,10,15,10z M15,16c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S16.1,16,15,16z" />
<path
android:fillColor="@color/md_white_1000"
android:pathData="M11,18c0,1.1-0.9,2-2,2s-2-0.9-2-2s0.9-2,2-2S11,16.9,11,18z M9,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2 S10.1,10,9,10z M9,4C7.9,4,7,4.9,7,6s0.9,2,2,2s2-0.9,2-2S10.1,4,9,4z M15,8c1.1,0,2-0.9,2-2s-0.9-2-2-2s-2,0.9-2,2S13.9,8,15,8z M15,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S16.1,10,15,10z M15,16c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S16.1,16,15,16z" />
<path
android:fillColor="@color/md_white_1000"
android:pathData="M11,18c0,1.1-0.9,2-2,2s-2-0.9-2-2s0.9-2,2-2S11,16.9,11,18z M9,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2 S10.1,10,9,10z M9,4C7.9,4,7,4.9,7,6s0.9,2,2,2s2-0.9,2-2S10.1,4,9,4z M15,8c1.1,0,2-0.9,2-2s-0.9-2-2-2s-2,0.9-2,2S13.9,8,15,8z M15,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S16.1,10,15,10z M15,16c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S16.1,16,15,16z" />
<path
android:fillColor="@color/md_white_1000"
android:pathData="M11,18c0,1.1-0.9,2-2,2s-2-0.9-2-2s0.9-2,2-2S11,16.9,11,18z M9,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2 S10.1,10,9,10z M9,4C7.9,4,7,4.9,7,6s0.9,2,2,2s2-0.9,2-2S10.1,4,9,4z M15,8c1.1,0,2-0.9,2-2s-0.9-2-2-2s-2,0.9-2,2S13.9,8,15,8z M15,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S16.1,10,15,10z M15,16c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S16.1,16,15,16z" />
</vector>

View file

@ -1,24 +0,0 @@
<!--
~ Copyright (c) 2020 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="#FFFFFF"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M18.92,5.01C18.72,4.42 18.16,4 17.5,4h-11c-0.66,0 -1.21,0.42 -1.42,1.01L3,11v8c0,0.55 0.45,1 1,1h1c0.55,0 1,-0.45 1,-1v-1h12v1c0,0.55 0.45,1 1,1h1c0.55,0 1,-0.45 1,-1v-8l-2.08,-5.99zM6.5,15c-0.83,0 -1.5,-0.67 -1.5,-1.5S5.67,12 6.5,12s1.5,0.67 1.5,1.5S7.33,15 6.5,15zM17.5,15c-0.83,0 -1.5,-0.67 -1.5,-1.5s0.67,-1.5 1.5,-1.5 1.5,0.67 1.5,1.5 -0.67,1.5 -1.5,1.5zM5,10l1.5,-4.5h11L19,10L5,10z" />
</vector>

View file

@ -1,24 +1,10 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2020 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path <path
android:fillColor="@color/md_white_1000" android:fillColor="@android:color/white"
android:pathData="M3 17.46v3.04c0 0.28 0.22 0.5 0.5 0.5h3.04c0.13 0 0.26-0.05 0.35 -0.15L17.81 9.94l-3.75-3.75L3.15 17.1c-0.1 0.1 -0.15 0.22 -0.15 0.36 zM20.71 7.04c0.39-0.39 0.39 -1.02 0-1.41l-2.34-2.34c-0.39-0.39-1.02-0.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z" /> android:pathData="M19.3,8.925 L15.05,4.725 16.45,3.325Q17.025,2.75 17.863,2.75Q18.7,2.75 19.275,3.325L20.675,4.725Q21.25,5.3 21.275,6.113Q21.3,6.925 20.725,7.5ZM4,21Q3.575,21 3.288,20.712Q3,20.425 3,20V17.175Q3,16.975 3.075,16.788Q3.15,16.6 3.3,16.45L13.6,6.15L17.85,10.4L7.55,20.7Q7.4,20.85 7.213,20.925Q7.025,21 6.825,21Z"/>
</vector> </vector>

View file

@ -1,25 +1,10 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2020 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
<path android:fillColor="@android:color/white"
android:fillColor="@color/md_white_1000" android:pathData="M6,20Q5.175,20 4.588,19.413Q4,18.825 4,18V14Q4,13.175 4.588,12.587Q5.175,12 6,12Q6.825,12 7.412,12.587Q8,13.175 8,14V18Q8,18.825 7.412,19.413Q6.825,20 6,20ZM12,20Q11.175,20 10.588,19.413Q10,18.825 10,18V6Q10,5.175 10.588,4.588Q11.175,4 12,4Q12.825,4 13.413,4.588Q14,5.175 14,6V18Q14,18.825 13.413,19.413Q12.825,20 12,20ZM18,20Q17.175,20 16.587,19.413Q16,18.825 16,18V11Q16,10.175 16.587,9.587Q17.175,9 18,9Q18.825,9 19.413,9.587Q20,10.175 20,11V18Q20,18.825 19.413,19.413Q18.825,20 18,20Z"/>
android:pathData="M12 20c1.1 0 2-0.9 2-2V6c0-1.1-0.9-2-2-2s-2 0.9-2 2v12c0 1.1 0.9 2 2 2zm-6 0c1.1 0 2-0.9 2-2v-4c0-1.1-0.9-2-2-2s-2 0.9-2 2v4c0 1.1 0.9 2 2 2zm10-9v7c0 1.1 0.9 2 2 2s2-0.9 2-2v-7c0-1.1-0.9-2-2-2s-2 0.9-2 2z" /> </vector>
</vector>

View file

@ -1,10 +1,10 @@
<vector android:height="24dp" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:tint="#FFFFFF"
android:viewportHeight="24.0"
android:viewportWidth="24.0"
android:width="24dp" android:width="24dp"
xmlns:android="http://schemas.android.com/apk/res/android"> android:height="24dp"
<path android:viewportWidth="24"
android:fillColor="#FF000000" android:viewportHeight="24"
android:pathData="M12,8l-6,6 1.41,1.41L12,10.83l4.59,4.58L18,14z" /> android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M6.7,14.675Q6.425,14.4 6.425,13.975Q6.425,13.55 6.7,13.275L11.3,8.675Q11.45,8.525 11.625,8.462Q11.8,8.4 12,8.4Q12.2,8.4 12.375,8.462Q12.55,8.525 12.7,8.675L17.325,13.3Q17.6,13.575 17.6,13.975Q17.6,14.375 17.3,14.675Q17.025,14.95 16.6,14.95Q16.175,14.95 15.9,14.675L12,10.775L8.075,14.7Q7.8,14.975 7.4,14.975Q7,14.975 6.7,14.675Z"/>
</vector> </vector>

View file

@ -1,23 +0,0 @@
<!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M13,9H18.5L13,3.5V9M6,2H14L20,8V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V4C4,2.89 4.89,2 6,2M9,16A2,2 0 0,0 7,18A2,2 0 0,0 9,20A2,2 0 0,0 11,18V13H14V11H10V16.27C9.71,16.1 9.36,16 9,16Z" />
</vector>

View file

@ -1,24 +1,10 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2020 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path <path
android:fillColor="@color/md_white_1000" android:fillColor="@android:color/white"
android:pathData="M14 6l-0.72-1.45c-0.17-0.34-0.52-0.55-0.9-0.55H6c-0.55 0-1 0.45-1 1v15c0 0.55 0.45 1 1 1s1-0.45 1-1v-6h5l0.72 1.45c0.17 0.34 0.52 0.55 0.89 0.55 H19c0.55 0 1-0.45 1-1V7c0-0.55-0.45-1-1-1h-5zm4 8h-4l-1-2H7V6h5l1 2h5v6z" /> android:pathData="M6,21Q5.575,21 5.287,20.712Q5,20.425 5,20V5Q5,4.575 5.287,4.287Q5.575,4 6,4H13.175Q13.525,4 13.8,4.225Q14.075,4.45 14.15,4.8L14.4,6H19Q19.425,6 19.712,6.287Q20,6.575 20,7V15Q20,15.425 19.712,15.712Q19.425,16 19,16H13.825Q13.475,16 13.2,15.775Q12.925,15.55 12.85,15.2L12.6,14H7V20Q7,20.425 6.713,20.712Q6.425,21 6,21ZM12.5,10ZM14.65,14H18V8H12.75L12.35,6H7V12H14.25Z"/>
</vector> </vector>

View file

@ -1,24 +1,10 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2020 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path <path
android:fillColor="@color/md_white_1000" android:fillColor="@android:color/white"
android:pathData="M10.59 4.59C10.21 4.21 9.7 4 9.17 4H4c-1.1 0-1.99 0.9 -1.99 2L2 18c0 1.1 0.9 2 2 2h16c1.1 0 2-0.9 2-2V8c0-1.1-0.9-2-2-2h-8l-1.41-1.41z" /> android:pathData="M4,20Q3.175,20 2.588,19.413Q2,18.825 2,18V6Q2,5.175 2.588,4.588Q3.175,4 4,4H9.175Q9.575,4 9.938,4.15Q10.3,4.3 10.575,4.575L12,6H20Q20.825,6 21.413,6.588Q22,7.175 22,8V18Q22,18.825 21.413,19.413Q20.825,20 20,20Z"/>
</vector> </vector>

View file

@ -1,10 +0,0 @@
<!-- drawable/food_croissant.xml -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/md_white_1000"
android:pathData="M22,19L19,17L22,15V19M15,15L19,9L22,13L18,16L15,15M5,17L2,19V15L5,17M9,15L6,16L2,13L5,9L9,15M14,6L18,8L13,15H11L6,8L10,6H14Z" />
</vector>

View file

@ -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,19Q5.575,19 5.287,18.712Q5,18.425 5,18V15Q5,14.575 5.287,14.287Q5.575,14 6,14Q6.425,14 6.713,14.287Q7,14.575 7,15V17H9Q9.425,17 9.713,17.288Q10,17.575 10,18Q10,18.425 9.713,18.712Q9.425,19 9,19ZM6,10Q5.575,10 5.287,9.712Q5,9.425 5,9V6Q5,5.575 5.287,5.287Q5.575,5 6,5H9Q9.425,5 9.713,5.287Q10,5.575 10,6Q10,6.425 9.713,6.713Q9.425,7 9,7H7V9Q7,9.425 6.713,9.712Q6.425,10 6,10ZM15,19Q14.575,19 14.288,18.712Q14,18.425 14,18Q14,17.575 14.288,17.288Q14.575,17 15,17H17V15Q17,14.575 17.288,14.287Q17.575,14 18,14Q18.425,14 18.712,14.287Q19,14.575 19,15V18Q19,18.425 18.712,18.712Q18.425,19 18,19ZM18,10Q17.575,10 17.288,9.712Q17,9.425 17,9V7H15Q14.575,7 14.288,6.713Q14,6.425 14,6Q14,5.575 14.288,5.287Q14.575,5 15,5H18Q18.425,5 18.712,5.287Q19,5.575 19,6V9Q19,9.425 18.712,9.712Q18.425,10 18,10Z"/>
</vector>

View file

@ -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="M4,17V19Q4,19 4,19Q4,19 4,19H20Q20,19 20,19Q20,19 20,19V17ZM4,21Q3.175,21 2.588,20.413Q2,19.825 2,19V8Q2,7.175 2.588,6.588Q3.175,6 4,6H6.2Q6.075,5.775 6.037,5.525Q6,5.275 6,5Q6,3.75 6.875,2.875Q7.75,2 9,2Q9.75,2 10.387,2.387Q11.025,2.775 11.5,3.35L12,4L12.5,3.35Q12.95,2.75 13.6,2.375Q14.25,2 15,2Q16.25,2 17.125,2.875Q18,3.75 18,5Q18,5.275 17.962,5.525Q17.925,5.775 17.8,6H20Q20.825,6 21.413,6.588Q22,7.175 22,8V19Q22,19.825 21.413,20.413Q20.825,21 20,21ZM4,14H20V8Q20,8 20,8Q20,8 20,8H14.9L16.425,10.075Q16.65,10.375 16.562,10.762Q16.475,11.15 16.2,11.425Q15.875,11.675 15.475,11.6Q15.075,11.525 14.825,11.2L12,7.4L9.175,11.225Q8.9,11.575 8.488,11.637Q8.075,11.7 7.8,11.425Q7.45,11.175 7.388,10.775Q7.325,10.375 7.575,10.05L9.05,8H4Q4,8 4,8Q4,8 4,8ZM9,6Q9.425,6 9.713,5.713Q10,5.425 10,5Q10,4.575 9.713,4.287Q9.425,4 9,4Q8.575,4 8.288,4.287Q8,4.575 8,5Q8,5.425 8.288,5.713Q8.575,6 9,6ZM15,6Q15.425,6 15.713,5.713Q16,5.425 16,5Q16,4.575 15.713,4.287Q15.425,4 15,4Q14.575,4 14.288,4.287Q14,4.575 14,5Q14,5.425 14.288,5.713Q14.575,6 15,6Z"/>
</vector>

View file

@ -1,24 +1,10 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2020 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path <path
android:fillColor="@color/md_white_1000" android:fillColor="@android:color/white"
android:pathData="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-0.9 0.92 c-0.5 0.51 -0.86 0.97 -1.04 1.69-0.08 0.32 -0.13 0.68 -0.13 1.14h-2v-0.5c0-0.46 0.08 -0.9 0.22 -1.31 0.2 -0.58 0.53 -1.1 0.95 -1.52l1.24-1.26c0.46-0.44 0.68 -1.1 0.55 -1.8-0.13-0.72-0.69-1.33-1.39-1.53-1.11-0.31-2.14 0.32 -2.47 1.27-0.12 0.37 -0.43 0.65 -0.82 0.65 h-0.3C8.4 9 8 8.44 8.16 7.88c0.43-1.47 1.68-2.59 3.23-2.83 1.52-0.24 2.97 0.55 3.87 1.8 1.18 1.63 0.83 3.38-0.19 4.4z" /> android:pathData="M11.95,18Q12.475,18 12.838,17.637Q13.2,17.275 13.2,16.75Q13.2,16.225 12.838,15.863Q12.475,15.5 11.95,15.5Q11.425,15.5 11.062,15.863Q10.7,16.225 10.7,16.75Q10.7,17.275 11.062,17.637Q11.425,18 11.95,18ZM12.1,7.7Q12.8,7.7 13.225,8.087Q13.65,8.475 13.65,9.1Q13.65,9.525 13.363,9.962Q13.075,10.4 12.55,10.875Q11.8,11.525 11.45,12.125Q11.1,12.725 11.1,13.325Q11.1,13.675 11.363,13.912Q11.625,14.15 11.975,14.15Q12.325,14.15 12.6,13.9Q12.875,13.65 12.95,13.275Q13.025,12.85 13.288,12.488Q13.55,12.125 14.15,11.55Q14.925,10.825 15.238,10.225Q15.55,9.625 15.55,8.9Q15.55,7.625 14.588,6.812Q13.625,6 12.1,6Q11.05,6 10.238,6.4Q9.425,6.8 8.975,7.625Q8.8,7.95 8.85,8.262Q8.9,8.575 9.2,8.775Q9.525,8.975 9.913,8.9Q10.3,8.825 10.55,8.475Q10.825,8.1 11.213,7.9Q11.6,7.7 12.1,7.7ZM12,22Q9.95,22 8.125,21.212Q6.3,20.425 4.938,19.075Q3.575,17.725 2.788,15.9Q2,14.075 2,12Q2,9.925 2.788,8.1Q3.575,6.275 4.938,4.925Q6.3,3.575 8.125,2.787Q9.95,2 12,2Q14.1,2 15.925,2.787Q17.75,3.575 19.1,4.925Q20.45,6.275 21.225,8.1Q22,9.925 22,12Q22,14.075 21.225,15.9Q20.45,17.725 19.1,19.075Q17.75,20.425 15.925,21.212Q14.1,22 12,22Z"/>
</vector> </vector>

View file

@ -1,10 +1,10 @@
<vector android:height="24dp" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:tint="#FFFFFF"
android:viewportHeight="24"
android:viewportWidth="24"
android:width="24dp" android:width="24dp"
xmlns:android="http://schemas.android.com/apk/res/android"> android:height="24dp"
<path android:viewportWidth="24"
android:fillColor="@android:color/white" android:viewportHeight="24"
android:pathData="M13,3c-4.97,0 -9,4.03 -9,9L1,12l3.89,3.89 0.07,0.14L9,12L6,12c0,-3.87 3.13,-7 7,-7s7,3.13 7,7 -3.13,7 -7,7c-1.93,0 -3.68,-0.79 -4.94,-2.06l-1.42,1.42C8.27,19.99 10.51,21 13,21c4.97,0 9,-4.03 9,-9s-4.03,-9 -9,-9zM12,8v5l4.28,2.54 0.72,-1.21 -3.5,-2.08L13.5,8L12,8z" /> android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M13,11.6 L15.5,14.1Q15.775,14.375 15.775,14.8Q15.775,15.225 15.5,15.5Q15.225,15.775 14.8,15.775Q14.375,15.775 14.1,15.5L11.3,12.7Q11.15,12.55 11.075,12.362Q11,12.175 11,11.975V8Q11,7.575 11.288,7.287Q11.575,7 12,7Q12.425,7 12.713,7.287Q13,7.575 13,8ZM12,21Q8.975,21 6.575,19.212Q4.175,17.425 3.35,14.55Q3.225,14.1 3.438,13.7Q3.65,13.3 4.1,13.2Q4.525,13.1 4.863,13.387Q5.2,13.675 5.325,14.1Q5.975,16.3 7.838,17.65Q9.7,19 12,19Q14.925,19 16.962,16.962Q19,14.925 19,12Q19,9.075 16.962,7.037Q14.925,5 12,5Q10.275,5 8.775,5.8Q7.275,6.6 6.25,8H8Q8.425,8 8.713,8.287Q9,8.575 9,9Q9,9.425 8.713,9.712Q8.425,10 8,10H4Q3.575,10 3.288,9.712Q3,9.425 3,9V5Q3,4.575 3.288,4.287Q3.575,4 4,4Q4.425,4 4.713,4.287Q5,4.575 5,5V6.35Q6.275,4.75 8.113,3.875Q9.95,3 12,3Q13.875,3 15.513,3.712Q17.15,4.425 18.363,5.637Q19.575,6.85 20.288,8.487Q21,10.125 21,12Q21,13.875 20.288,15.512Q19.575,17.15 18.363,18.362Q17.15,19.575 15.513,20.288Q13.875,21 12,21Z"/>
</vector> </vector>

View file

@ -1,23 +1,10 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2020 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24"
<path android:tint="?attr/colorControlNormal">
android:fillColor="@color/md_white_1000" <path
android:pathData="M10 19v-5h4v5c0 0.55 0.45 1 1 1h3c0.55 0 1-0.45 1-1v-7h1.7c0.46 0 0.68-0.57 0.33 -0.87L12.67 3.6c-0.38-0.34-0.96-0.34-1.34 0l-8.36 7.53c-0.34 0.3 -0.13 0.87 0.33 0.87 H5v7c0 0.55 0.45 1 1 1h3c0.55 0 1-0.45 1-1z" /> android:fillColor="@android:color/white"
</vector> android:pathData="M6,21Q5.175,21 4.588,20.413Q4,19.825 4,19V10Q4,9.525 4.213,9.1Q4.425,8.675 4.8,8.4L10.8,3.9Q11.075,3.7 11.375,3.6Q11.675,3.5 12,3.5Q12.325,3.5 12.625,3.6Q12.925,3.7 13.2,3.9L19.2,8.4Q19.575,8.675 19.788,9.1Q20,9.525 20,10V19Q20,19.825 19.413,20.413Q18.825,21 18,21H14V14H10V21Z"/>
</vector>

View file

@ -1,25 +1,10 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2020 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
<path android:fillColor="@android:color/white"
android:fillColor="@color/md_white_1000" android:pathData="M7,17H17Q17.3,17 17.45,16.725Q17.6,16.45 17.4,16.2L14.65,12.525Q14.5,12.325 14.25,12.325Q14,12.325 13.85,12.525L11.25,16L9.4,13.525Q9.25,13.325 9,13.325Q8.75,13.325 8.6,13.525L6.6,16.2Q6.4,16.45 6.55,16.725Q6.7,17 7,17ZM5,21Q4.175,21 3.587,20.413Q3,19.825 3,19V5Q3,4.175 3.587,3.587Q4.175,3 5,3H19Q19.825,3 20.413,3.587Q21,4.175 21,5V19Q21,19.825 20.413,20.413Q19.825,21 19,21ZM5,19H19Q19,19 19,19Q19,19 19,19V5Q19,5 19,5Q19,5 19,5H5Q5,5 5,5Q5,5 5,5V19Q5,19 5,19Q5,19 5,19ZM5,5Q5,5 5,5Q5,5 5,5V19Q5,19 5,19Q5,19 5,19Q5,19 5,19Q5,19 5,19V5Q5,5 5,5Q5,5 5,5Z"/>
android:pathData="M19 5v14H5V5h14m0-2H5c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2V5c0-1.1-0.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z" /> </vector>
</vector>

View file

@ -1,23 +1,10 @@
<!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:viewportWidth="24.0" android:viewportWidth="24"
android:viewportHeight="24.0"> android:viewportHeight="24"
<path android:tint="?attr/colorControlNormal">
android:fillColor="@color/md_white_1000" <path
android:pathData="M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z" /> android:fillColor="@android:color/white"
android:pathData="M12,17Q12.425,17 12.713,16.712Q13,16.425 13,16V11.975Q13,11.55 12.713,11.275Q12.425,11 12,11Q11.575,11 11.288,11.287Q11,11.575 11,12V16.025Q11,16.45 11.288,16.725Q11.575,17 12,17ZM12,9Q12.425,9 12.713,8.712Q13,8.425 13,8Q13,7.575 12.713,7.287Q12.425,7 12,7Q11.575,7 11.288,7.287Q11,7.575 11,8Q11,8.425 11.288,8.712Q11.575,9 12,9ZM12,22Q9.925,22 8.1,21.212Q6.275,20.425 4.925,19.075Q3.575,17.725 2.788,15.9Q2,14.075 2,12Q2,9.925 2.788,8.1Q3.575,6.275 4.925,4.925Q6.275,3.575 8.1,2.787Q9.925,2 12,2Q14.075,2 15.9,2.787Q17.725,3.575 19.075,4.925Q20.425,6.275 21.212,8.1Q22,9.925 22,12Q22,14.075 21.212,15.9Q20.425,17.725 19.075,19.075Q17.725,20.425 15.9,21.212Q14.075,22 12,22ZM12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12ZM12,20Q15.325,20 17.663,17.663Q20,15.325 20,12Q20,8.675 17.663,6.337Q15.325,4 12,4Q8.675,4 6.338,6.337Q4,8.675 4,12Q4,15.325 6.338,17.663Q8.675,20 12,20Z"/>
</vector> </vector>

View file

@ -1,23 +1,10 @@
<!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:viewportWidth="24.0" android:viewportWidth="24"
android:viewportHeight="24.0"> android:viewportHeight="24"
<path android:tint="?attr/colorControlNormal">
android:fillColor="@color/md_white_1000" <path
android:pathData="M20,5L4,5c-1.1,0 -1.99,0.9 -1.99,2L2,17c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,7c0,-1.1 -0.9,-2 -2,-2zM11,8h2v2h-2L11,8zM11,11h2v2h-2v-2zM8,8h2v2L8,10L8,8zM8,11h2v2L8,13v-2zM7,13L5,13v-2h2v2zM7,10L5,10L5,8h2v2zM16,17L8,17v-2h8v2zM16,13h-2v-2h2v2zM16,10h-2L14,8h2v2zM19,13h-2v-2h2v2zM19,10h-2L17,8h2v2z" /> android:fillColor="@android:color/white"
android:pathData="M3,21Q2.175,21 1.588,20.413Q1,19.825 1,19V6Q1,5.175 1.588,4.588Q2.175,4 3,4H21Q21.825,4 22.413,4.588Q23,5.175 23,6V19Q23,19.825 22.413,20.413Q21.825,21 21,21ZM9,10H11V8H9ZM5,10H7V8H5ZM8.5,17H15.5Q15.7,17 15.85,16.85Q16,16.7 16,16.5Q16,16.3 15.85,16.15Q15.7,16 15.5,16H8.5Q8.3,16 8.15,16.15Q8,16.3 8,16.5Q8,16.7 8.15,16.85Q8.3,17 8.5,17ZM13,10H15V8H13ZM9,14H11V12H9ZM5,14H7V12H5ZM13,14H15V12H13ZM17,10H19V8H17ZM17,14H19V12H17Z"/>
</vector> </vector>

View file

@ -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="M12,14.975Q11.8,14.975 11.613,14.9Q11.425,14.825 11.3,14.7L6.7,10.1Q6.425,9.825 6.425,9.4Q6.425,8.975 6.7,8.7Q6.975,8.425 7.4,8.425Q7.825,8.425 8.1,8.7L12,12.6L15.9,8.7Q16.175,8.425 16.6,8.425Q17.025,8.425 17.3,8.7Q17.575,8.975 17.575,9.4Q17.575,9.825 17.3,10.1L12.7,14.7Q12.55,14.85 12.375,14.912Q12.2,14.975 12,14.975Z"/>
</vector>

View file

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/md_white_1000"
android:pathData="M8.12 9.29L12 13.17l3.88-3.88c0.39-0.39 1.02-0.39 1.41 0 0.39 0.39 0.39 1.02 0 1.41l-4.59 4.59c-0.39 0.39 -1.02 0.39 -1.41 0L6.7 10.7c-0.39-0.39-0.39-1.02 0-1.41 0.39 -0.38 1.03-0.39 1.42 0z" />
</vector>

Some files were not shown because too many files have changed in this diff Show more