private void addFlags(int newflags){
  flags=getLayoutFlags() | newflags;
}

private void addFlags ( int newflags ) { flags = getLayoutFlags ( ) | newflags ; }
or newflags with existing flags . first computes existing flags if needed .
