@Override public boolean shouldUseFullyQualifiedName(@NotNull PsiFile targetFile,@NotNull String classQualifiedName){
  if (classQualifiedName.equals(CLASS_R) || classQualifiedName.startsWith(CLASS_R_PREFIX)) {
    return true;
  }
  int index=classQualifiedName.lastIndexOf('.');
  if (index == classQualifiedName.length() - 2 && classQualifiedName.charAt(index + 1) == 'R') {
    String pkg=getApplicationPackage(targetFile);
    if (pkg != null) {
      return !isResourceClassReference(classQualifiedName,pkg + ".R");
    }
  }
 else   if (index > 2 && classQualifiedName.charAt(index - 1) == 'R' && classQualifiedName.charAt(index - 2) == '.') {
    return classQualifiedName.startsWith(CLASS_R) || ResourceType.getEnum(classQualifiedName.substring(index + 1)) != null;
  }
  return false;
}

@ Override public boolean shouldUseFullyQualifiedName ( @ NotNull PsiFile targetFile , @ NotNull String classQualifiedName ) { if ( classQualifiedName . equals ( CLASS_R ) || classQualifiedName . startsWith ( CLASS_R_PREFIX ) ) { return true ; } int index = classQualifiedName . lastIndexOf ( '.' ) ; if ( index == classQualifiedName . length ( ) - 2 && classQualifiedName . charAt ( index + 1 ) == 'R' ) { String pkg = getApplicationPackage ( targetFile ) ; if ( pkg != null ) { return ! isResourceClassReference ( classQualifiedName , pkg + ".R" ) ; } } else if ( index > 2 && classQualifiedName . charAt ( index - 1 ) == 'R' && classQualifiedName . charAt ( index - 2 ) == '.' ) { return classQualifiedName . startsWith ( CLASS_R ) || ResourceType . getEnum ( classQualifiedName . substring ( index + 1 ) ) != null ; } return false ; }
never import android . r , or inner classes of application r or android . r classes
