Skip to content

Commit 2222ab3

Browse files
author
Iain Connor
committed
Think this should get the layout lining up properly
1 parent 1cc9a7f commit 2222ab3

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

library/src/main/java/com/tippingcanoe/dewey/DeweyDecorator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ protected void measureView ( View view ) {
195195
protected int getWidthForView ( View view ) {
196196
if ( view.getLayoutParams().width != ViewGroup.LayoutParams.MATCH_PARENT && view.getLayoutParams().width != ViewGroup.LayoutParams.WRAP_CONTENT ) {
197197
return view.getLayoutParams().width;
198+
} else if ( ((DeweyLayoutManager) dewey.getLayoutManager()).getForcedCellWidth() > 0 ) {
199+
return ((DeweyLayoutManager) dewey.getLayoutManager()).getForcedCellWidth();
198200
}
199201

200202
return 0;

library/src/main/java/com/tippingcanoe/dewey/DeweyLayoutManager.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,8 @@ public void setUniformCellWidth(int uniformCellWidth) {
107107
this.uniformCellWidth = uniformCellWidth;
108108
updateUniformCellWidth();
109109
}
110+
111+
public int getForcedCellWidth() {
112+
return forcedCellWidth;
113+
}
110114
}

0 commit comments

Comments
 (0)