Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

kotlin enable and disable parents view children

private static void setViewAndChildrenEnabled(View view, boolean enabled) {
    view.setEnabled(enabled);
    if (view instanceof ViewGroup) {
        ViewGroup viewGroup = (ViewGroup) view;
        for (int i = 0; i < viewGroup.getChildCount(); i++) {
            View child = viewGroup.getChildAt(i);
            setViewAndChildrenEnabled(child, enabled);
        }
    }
}
Comment

PREVIOUS NEXT
Code Example
Java :: Caused by: java.lang.NoSuchMethodError: org.apache.logging.log4j.spi.LoggerContextFactory.isClassLoaderDependent()Z 
Java :: ++i vs i++ java 
Java :: spring security enable global cors 
Java :: hashmap sort by value descending 
Java :: convert double to in in java 
Java :: text.settextcolor android 
Java :: password encryption and decryption in java 
Java :: java string array 
Java :: foreach map java 
Java :: java get random char 
Java :: loop through a 2d array java 
Java :: calendar java add 1 day 
Java :: android studio portrait modeeee 
Java :: java log2 
Java :: space in java 
Java :: android vibrate 
Java :: get random word from array java 
Java :: java remove duplicates from list by property 
Java :: remove extra spaces java 
Java :: copy arraylist java 
Java :: java how to print a string[] 
Java :: java random 
Java :: android studio go to another activity kotlin 
Java :: how to get a section of an array in java 
Java :: java output array lists to file 
Java :: java separate the numbers from string 
Java :: java parse unix timestamp 
Java :: java arraylist loop 
Java :: comparable on a generic class java 
Java :: why bufferedreader is faster than scanner 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =