public static void setEnabledStateOnViews(View v, boolean enabled) {
    v.setEnabled(enabled);

    if (v instanceof ViewGroup) {
      final ViewGroup vg = (ViewGroup) v;
      for (int i = vg.getChildCount() - 1; i >= 0; i--) {
        setEnabledStateOnViews(vg.getChildAt(i), enabled);
      }
    }
  }
Makes sure the view (and any children) get the enabled state changed.
xlog-sample/src/main/java/com/elvishew/xlogsample/MainActivity.java