I want to change the color of ImageView from my Service class. But I don't know how to access ImageView from service class. This is my layout file:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitXY"
android:layout_alignParentStart ="true"
android:layout_centerVertical = "true"
android:src="@drawable/batman_r"/>
</RelativeLayout>
I want to change the color of ImageView from my Service class. But I don't know how to access ImageView from service class. I just want to getImageView and get drawable from it and set its Tint to my desirable color. Please he