private void addFormField(FormField formFieldAnnotation, ViewGroup parentView) { Log.i(TAG, "adding form field " + formFieldAnnotation.type()); int layoutResId = GRFormField.getLayoutId(formFieldAnnotation); if (layoutResId > 0) { View view; if (isFieldPresent(formFieldAnnotation, parentView)) { view = parentView.findViewById(formFieldAnnotation.id()); } else { view = activity.getLayoutInflater().inflate(layoutResId, parentView, false); GRFormField.assignViewId(view, formFieldAnnotation); parentView.addView(view); } GRFormField formField = GRFormField.construct(this, formObject, formFieldAnnotation, view); formFieldList.add(formField); } else { Log.w(TAG, "layout for " + formFieldAnnotation.type() + " not found"); } }