Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timob 11352 3 0 x #3566

Merged
merged 3 commits into from
Dec 11, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ protected boolean rowClicked(TiBaseTableViewItem rowView, int position, boolean

private TiUIView layoutHeaderOrFooter(TiViewProxy viewProxy)
{
TiUIView tiView = viewProxy.getOrCreateView();
TiUIView tiView = viewProxy.getOrCreateView(false); // false means don't set model listener
View nativeView = tiView.getOuterView();
TiCompositeLayout.LayoutParams params = tiView.getLayoutParams();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class TiTableViewHeaderItem extends TiBaseTableViewItem
private RowView rowView;
private TiUIView headerView;
private boolean isHeaderView = false;
private Item item;

class RowView extends RelativeLayout
{
Expand Down Expand Up @@ -110,6 +111,8 @@ public void setRowData(Item item)

private void setHeaderData(Item item)
{
this.item = item;
headerView.processProperties(item.proxy.getProperties());
if (headerView != null && headerView.getChildren() != null && headerView.getChildren().size() > 0 && item != null
&& item.proxy != null && item.proxy.getChildren() != null && item.proxy.getChildren().length > 0) {
TiUIView labelView = headerView.getChildren().get(0);
Expand Down Expand Up @@ -142,6 +145,15 @@ protected void onLayout(boolean changed, int left, int top, int right, int botto
if (!isHeaderView) {
rowView.layout(left, 0, right, bottom - top);
} else {
//
// Do this association here, and NOT in getView().
//
TiViewProxy proxy = this.item.proxy;
proxy.setView(headerView);
headerView.setProxy(proxy);
proxy.setModelListener(headerView);


View view = headerView.getOuterView();
view.layout(left, 0, right, bottom - top);
// Also layout the inner native view when we have borders
Expand Down