class TextInputLayoutHandler extends LinearLayoutHandler {

  @Override
  @Language("XML")
  @NotNull
  public String getXml(@NotNull String tagName, @NotNull XmlType xmlType) {
    boolean isMaterial2 = tagName.startsWith(MATERIAL2_PKG);
    switch (xmlType) {
      case COMPONENT_CREATION:
        String textInputEditTextTag = isMaterial2 ? TEXT_INPUT_EDIT_TEXT.newName() : TEXT_INPUT_EDIT_TEXT.oldName();
        return new XmlBuilder()
          .startTag(tagName)
          .androidAttribute(ATTR_LAYOUT_WIDTH, VALUE_MATCH_PARENT)
          .androidAttribute(ATTR_LAYOUT_HEIGHT, VALUE_WRAP_CONTENT)
            .startTag(textInputEditTextTag)
            .androidAttribute(ATTR_LAYOUT_WIDTH, VALUE_MATCH_PARENT)
            .androidAttribute(ATTR_LAYOUT_HEIGHT, VALUE_WRAP_CONTENT)
            .androidAttribute(ATTR_HINT, "hint")
            .endTag(textInputEditTextTag)
          .endTag(tagName)
          .toString();
      default:
        return super.getXml(tagName, xmlType);
    }
  }

}