Skip to content

Commit

Permalink
Fix for field input text (#24)
Browse files Browse the repository at this point in the history
* Change fixed height to ‘wrap_content’ for FieldInputText

* Improve ‘setErrorText’ for FieldInputText when using ‘TextInputLayout’

* Fix ‘minHeight’ for ‘FieldInputText’

* Fix height for section title empty
  • Loading branch information
claudiopaccone authored and brescia123 committed Apr 11, 2017
1 parent 111598a commit 865babd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ public void bind(PositionAwareSectionViewModel sectionViewModel) {
}

public int getHeight() {
return (int) (titleTextView.getText().length() == 0
? itemView.getResources().getDimension(R.dimen.section_height_small)
return (int) (titleTextView.getText().toString().trim().isEmpty()
? 0
: getOriginalHeight());
}
}
Expand Down
1 change: 1 addition & 0 deletions src/main/res/layout/form_field_input_text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
android:background="@drawable/form_field_background"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/field_height_big"
android:orientation="vertical">


Expand Down

0 comments on commit 865babd

Please sign in to comment.