Commit 1e49b097 authored by Aayush Gupta's avatar Aayush Gupta
Browse files

Apps: Migrate to getColor() method

The current one has been deprecated

References:
- [1]: https://developer.android.com/reference/android/content/res/Resources#getColor(int)

Signed-off-by: Aayush Gupta's avatarAayush Gupta <theimpulson@e.email>
parent f2cbc07a
......@@ -354,7 +354,7 @@ class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemS
* */
private fun getAccentColor() {
accentColorOS=this.resources.getColor(R.color.colorAccent);
accentColorOS = this.getColor(R.color.colorAccent);
......
......@@ -761,6 +761,6 @@ class ApplicationActivity :
}
private fun getAccentColor() {
accentColorOS = this.resources.getColor(R.color.colorAccent);
accentColorOS = this.getColor(R.color.colorAccent);
}
}
......@@ -471,7 +471,7 @@ class Application(val packageName: String, private val applicationManager: Appli
*/
fun getAccentColor(context: Context): Int {
val color =context.resources.getColor(foundation.e.apps.R.color.colorAccent);
val color = context.getColor(foundation.e.apps.R.color.colorAccent);
return color;
}
......
......@@ -69,7 +69,7 @@ class CategoriesFragment : Fragment() {
*/
fun getAccentColor(context: Context): Int {
val color =context.resources.getColor(R.color.colorAccent);
val color = context.getColor(R.color.colorAccent);
return color;
......
......@@ -199,6 +199,6 @@ class CategoryActivity : AppCompatActivity(), ApplicationManagerServiceConnectio
* */
private fun getAccentColor() {
accentColorOS=this.resources.getColor(R.color.colorAccent);
accentColorOS = this.getColor(R.color.colorAccent);
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment