Add setEnabledRecursively utility function
[unical.git] / src / ro / ieval / unical / Utils.java
1 package ro.ieval.unical;
2
3 import android.view.View;
4 import android.view.ViewGroup;
5
6 final class Utils {
7 public void setEnabledRecursively(final View view, final boolean enabled){
8 view.setEnabled(enabled);
9 if(view instanceof ViewGroup){
10 final ViewGroup group=(ViewGroup) view;
11 for(int i=0;i<group.getChildCount();i++)
12 setEnabledRecursively(group.getChildAt(i), enabled);
13 }
14 }
15 }
This page took 0.019667 seconds and 4 git commands to generate.