diff --git a/src/main/java/it/facile/form/SectionedRecyclerViewAdapter.java b/src/main/java/it/facile/form/SectionedRecyclerViewAdapter.java index 05832a2..16f80ce 100644 --- a/src/main/java/it/facile/form/SectionedRecyclerViewAdapter.java +++ b/src/main/java/it/facile/form/SectionedRecyclerViewAdapter.java @@ -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()); } } diff --git a/src/main/res/layout/form_field_input_text.xml b/src/main/res/layout/form_field_input_text.xml index ef6de21..2492b07 100644 --- a/src/main/res/layout/form_field_input_text.xml +++ b/src/main/res/layout/form_field_input_text.xml @@ -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">