forked from upstream-mirrors/quik
Use correct color for recent apps bar
This commit is contained in:
@@ -19,7 +19,9 @@
|
||||
package common.base
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.ActivityManager
|
||||
import android.arch.lifecycle.Lifecycle
|
||||
import android.graphics.BitmapFactory
|
||||
import android.os.Bundle
|
||||
import com.moez.QKSMS.R
|
||||
import com.uber.autodispose.android.lifecycle.scope
|
||||
@@ -102,6 +104,12 @@ abstract class QkThemedActivity<VM : QkViewModel<*, *>> : QkActivity<VM>() {
|
||||
.subscribe { res -> toolbar?.popupTheme = res }
|
||||
|
||||
colors.toolbarColor
|
||||
.doOnNext { color -> toolbar?.setBackgroundTint(color) }
|
||||
.doOnNext { color -> // Set the color for the recent apps title
|
||||
val icon = BitmapFactory.decodeResource(resources, R.mipmap.ic_launcher)
|
||||
val taskDesc = ActivityManager.TaskDescription(getString(R.string.app_name), icon, color)
|
||||
setTaskDescription(taskDesc)
|
||||
}
|
||||
.autoDisposable(scope(Lifecycle.Event.ON_DESTROY))
|
||||
.subscribe { color -> toolbar?.setBackgroundTint(color) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user