Skip to content

Commit

Permalink
Merge branch 'fixListViewTemplate' of https://github.com/tidev/titani…
Browse files Browse the repository at this point in the history
…um-sdk into fixListViewTemplate
  • Loading branch information
m1ga committed Sep 18, 2024
2 parents da70068 + 34dc79e commit 1c7f3fe
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -412,15 +412,14 @@ private void setHeaderFooter(TiViewProxy listViewProxy,

ConstraintSet constraintSet = new ConstraintSet();
constraintSet.clone((ConstraintLayout) this.container);

int holderId = R.id.titanium_ui_listview_holder_header;
if (this.content.getChildCount() > 0) {
// attach to content
constraintSet.connect(R.id.titanium_ui_listview_holder_content, ConstraintSet.BOTTOM,
R.id.titanium_ui_listview_holder_footer, ConstraintSet.TOP, 0);
} else {
// attach to header
constraintSet.connect(R.id.titanium_ui_listview_holder_header, ConstraintSet.BOTTOM,
R.id.titanium_ui_listview_holder_footer, ConstraintSet.TOP, 0);
holderId = R.id.titanium_ui_listview_holder_content;
}

constraintSet.connect(holderId, ConstraintSet.BOTTOM,
R.id.titanium_ui_listview_holder_footer, ConstraintSet.TOP, 0);
constraintSet.connect(R.id.titanium_ui_listview_holder_left_image, ConstraintSet.BOTTOM,
R.id.titanium_ui_listview_holder_footer, ConstraintSet.TOP, 0);
constraintSet.connect(R.id.titanium_ui_listview_holder_right_image, ConstraintSet.BOTTOM,
Expand Down

0 comments on commit 1c7f3fe

Please sign in to comment.