I would like to somehow check if the activity is open. I have got activity1.java and activity2.java. If the user will open activity 1, textview will be green else textview will be blue(I know how to change background dynamically). I want to do it this way!
If (activity1 is open) {
tv.setBackgroundColor(COLOR.GREEN);
} else if(activity2 is open) {
tv.setBackgroundColor(COLOR.BLUE);
}