Fix layout issue in notificaiton

This commit is contained in:
h4h13 2019-10-31 22:36:13 +05:30
parent 7410515d1e
commit 24fbc59b11
6 changed files with 6 additions and 52 deletions

View file

@ -13,7 +13,7 @@ android {
vectorDrawables.useSupportLibrary = true vectorDrawables.useSupportLibrary = true
applicationId "code.name.monkey.retromusic" applicationId "code.name.monkey.retromusic"
versionCode 385 versionCode 387
versionName '3.4.500' versionName '3.4.500'
multiDexEnabled true multiDexEnabled true

View file

@ -1,27 +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.
*/
package code.name.monkey.retromusic
import kotlinx.coroutines.Dispatchers
import kotlin.coroutines.CoroutineContext
/**
* Created by hemanths on 2019-10-23.
*/
class AppExecutors constructor(
val ioContext: CoroutineContext = Dispatchers.IO,
val uiContext: CoroutineContext = Dispatchers.Main
)

View file

@ -139,12 +139,8 @@ class PlayingNotificationOreo : PlayingNotification() {
} }
private fun setBackgroundColor(color: Int) { private fun setBackgroundColor(color: Int) {
notificationLayout.setInt(R.id.image, "setBackgroundColor", color) notificationLayout.setInt(R.id.image, "setBackgroundColor", color)
notificationLayoutBig.setInt(R.id.image, "setBackgroundColor", color) notificationLayoutBig.setInt(R.id.image, "setBackgroundColor", color)
notificationLayout.setInt(R.id.foregroundImage, "setColorFilter", color)
notificationLayoutBig.setInt(R.id.foregroundImage, "setColorFilter", color)
} }
private fun setNotificationContent(dark: Boolean) { private fun setNotificationContent(dark: Boolean) {

View file

@ -23,14 +23,6 @@
android:scaleType="centerCrop" android:scaleType="centerCrop"
tools:src="@tools:sample/avatars" /> tools:src="@tools:sample/avatars" />
<ImageView
android:id="@+id/foregroundImage"
android:layout_width="96dp"
android:layout_height="match_parent"
android:layout_alignStart="@id/largeIcon"
android:src="@drawable/background_image"
tools:tint="?colorPrimary" />
</RelativeLayout> </RelativeLayout>
<LinearLayout <LinearLayout
@ -60,7 +52,7 @@
android:ellipsize="end" android:ellipsize="end"
android:lines="1" android:lines="1"
android:singleLine="true" android:singleLine="true"
android:textSize="12sp" android:textSize="10sp"
tools:text="@string/app_name" /> tools:text="@string/app_name" />
<ImageView <ImageView
@ -84,8 +76,8 @@
android:layout_toStartOf="@id/actions" android:layout_toStartOf="@id/actions"
android:orientation="vertical" android:orientation="vertical"
android:paddingStart="12dp" android:paddingStart="12dp"
android:paddingBottom="4dp" android:paddingEnd="12dp"
android:paddingEnd="12dp"> android:paddingBottom="4dp">
<TextView <TextView
android:id="@+id/title" android:id="@+id/title"

View file

@ -20,13 +20,6 @@
android:scaleType="centerCrop" android:scaleType="centerCrop"
tools:src="@tools:sample/avatars" /> tools:src="@tools:sample/avatars" />
<ImageView
android:id="@+id/foregroundImage"
android:layout_width="96dp"
android:layout_height="match_parent"
android:layout_alignStart="@id/largeIcon"
android:src="@drawable/background_image" />
</RelativeLayout> </RelativeLayout>
<LinearLayout <LinearLayout
@ -62,7 +55,7 @@
android:ellipsize="end" android:ellipsize="end"
android:lines="1" android:lines="1"
android:singleLine="true" android:singleLine="true"
android:textSize="13sp" android:textSize="10sp"
tools:text="@string/app_name" /> tools:text="@string/app_name" />
<ImageView <ImageView

View file

@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { buildscript {
ext.kotlin_version = '1.3.50' ext.kotlin_version = '1.3.41'
repositories { repositories {
jcenter() jcenter()
google() google()