I'm using a Fragment on multiple Activities to show the ShowCaseView, everything is fine, but I want to disable the controls that has been outlined by ShowCaseView during the presentation, prevent them from being clicked before the presentation is over.
Like that:
getActivity().getWindow().getDecorView().findViewById(android.R.id.content).findViewById(R.id.btnJournal).setEnabled(false);
I can disable one element that I know about, but I want to get all childs of that View and make them all disabled without explicitly writing their ids, but what I get with getActivity().getWindow().getDecorView().findViewById(android.R.id.content)
is a View and not ViewGroup or LinearLayout, if I cast it to ViewGroup - it can't find any child, if I cast it to LinearLayout, then, well:
`Caused by: java.lang.ClassCastException: com.android.internal.policy.impl.PhoneWindow$DecorView cannot be cast to android.widget.LinearLayout`
How can I iterate through it's children?