From 78a0eac306effe1597753a349dad992f016b9d1e Mon Sep 17 00:00:00 2001 From: Julien Guerinet Date: Sat, 9 Apr 2016 17:27:52 -0400 Subject: [PATCH] Added method to remove the single line property of the view. --- .idea/misc.xml | 2 +- README.md | 2 +- .../java/com/guerinet/formgenerator/ButtonFormItem.java | 6 +++--- .../java/com/guerinet/formgenerator/EditTextFormItem.java | 6 +++--- .../java/com/guerinet/formgenerator/SwitchFormItem.java | 6 +++--- .../java/com/guerinet/formgenerator/TextViewFormItem.java | 6 +++--- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 5d19981..fbb6828 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -37,7 +37,7 @@ - + diff --git a/README.md b/README.md index e4b39e1..1595a74 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ To get the associated view, simple call `view()` at the end of your customizatio * Setting an `OnCheckedChangeListener` for `Switch`es * Setting an `OnClickListener` for all form items except the spaces and lines * Setting the input type on the `EditText`s (default is capitalized sentences) -* Setting if the `EditText` should be single line or not (default is true) +* Setting if the `EditText` should be multi line (default is single line) * Setting icons on all form items except the spaces and lines IMPORTANT: All views need to be built by calling `build()` after adding it except for spaces and lines. If you do not call `build()` they will not be added to the container. diff --git a/library/src/main/java/com/guerinet/formgenerator/ButtonFormItem.java b/library/src/main/java/com/guerinet/formgenerator/ButtonFormItem.java index af9cda2..4d11a4a 100644 --- a/library/src/main/java/com/guerinet/formgenerator/ButtonFormItem.java +++ b/library/src/main/java/com/guerinet/formgenerator/ButtonFormItem.java @@ -328,13 +328,13 @@ public ButtonFormItem gravity(int gravity) { } /** - * Sets the {@link TextView} to be single line + * Sets the {@link TextView} to be multi line * * @return The {@link ButtonFormItem} instance */ @Override - public ButtonFormItem singleLine() { - return (ButtonFormItem) super.singleLine(); + public ButtonFormItem removeSingleLine() { + return (ButtonFormItem) super.removeSingleLine(); } /** diff --git a/library/src/main/java/com/guerinet/formgenerator/EditTextFormItem.java b/library/src/main/java/com/guerinet/formgenerator/EditTextFormItem.java index 601b81f..f94cd5f 100644 --- a/library/src/main/java/com/guerinet/formgenerator/EditTextFormItem.java +++ b/library/src/main/java/com/guerinet/formgenerator/EditTextFormItem.java @@ -352,13 +352,13 @@ public EditTextFormItem onClick(OnClickListener listener) { } /** - * Sets the {@link TextView} to be single line + * Sets the {@link TextView} to be multi line * * @return The {@link EditTextFormItem} instance */ @Override - public EditTextFormItem singleLine() { - return (EditTextFormItem) super.singleLine(); + public EditTextFormItem removeSingleLine() { + return (EditTextFormItem) super.removeSingleLine(); } /** diff --git a/library/src/main/java/com/guerinet/formgenerator/SwitchFormItem.java b/library/src/main/java/com/guerinet/formgenerator/SwitchFormItem.java index 4b3e367..e5e9f6a 100644 --- a/library/src/main/java/com/guerinet/formgenerator/SwitchFormItem.java +++ b/library/src/main/java/com/guerinet/formgenerator/SwitchFormItem.java @@ -401,13 +401,13 @@ public SwitchFormItem gravity(int gravity) { } /** - * Sets the {@link TextView} to be single line + * Sets the {@link TextView} to be multi line * * @return The {@link SwitchFormItem} instance */ @Override - public SwitchFormItem singleLine() { - return (SwitchFormItem) super.singleLine(); + public SwitchFormItem removeSingleLine() { + return (SwitchFormItem) super.removeSingleLine(); } /** diff --git a/library/src/main/java/com/guerinet/formgenerator/TextViewFormItem.java b/library/src/main/java/com/guerinet/formgenerator/TextViewFormItem.java index 75e8ae5..b9f529a 100644 --- a/library/src/main/java/com/guerinet/formgenerator/TextViewFormItem.java +++ b/library/src/main/java/com/guerinet/formgenerator/TextViewFormItem.java @@ -407,12 +407,12 @@ public TextViewFormItem gravity(int gravity) { } /** - * Sets the {@link TextView} to be single line + * Sets the {@link TextView} to be multi line * * @return The {@link TextViewFormItem} instance */ - public TextViewFormItem singleLine() { - textView.setSingleLine(); + public TextViewFormItem removeSingleLine() { + textView.setSingleLine(false); return this; }