Workarounds for a couple crashes. (Bug 5612584, Bug 5613438)

Change-Id: I9669d830a10cc98291737f3f1d561c846c408289
This commit is contained in:
Winson Chung
2011-11-14 11:39:07 -08:00
parent 4db3f7ec76
commit c6f10b906f
7 changed files with 64 additions and 49 deletions

View File

@@ -46,6 +46,16 @@ public class PagedViewGridLayout extends GridLayout implements Page {
return mCellCountY;
}
/**
* Clears all the key listeners for the individual widgets.
*/
public void resetChildrenOnKeyListeners() {
int childCount = getChildCount();
for (int j = 0; j < childCount; ++j) {
getChildAt(j).setOnKeyListener(null);
}
}
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
// PagedView currently has issues with different-sized pages since it calculates the
// offset of each page to scroll to before it updates the actual size of each page