Code drop from //branches/cupcake/...@124589

This commit is contained in:
The Android Open Source Project
2008-12-17 18:05:58 -08:00
parent c8f00b61c6
commit d097a1880f
47 changed files with 2521 additions and 453 deletions
+11
View File
@@ -104,6 +104,17 @@ public class CellLayout extends ViewGroup {
return mPortrait ? mLongAxisCells : mShortAxisCells;
}
@Override
public void addView(View child, int index, ViewGroup.LayoutParams params) {
// Generate an id for each view, this assumes we have at most 256x256 cells
// per workspace screen
final LayoutParams cellParams = (LayoutParams) params;
child.setId(((getId() & 0xFF) << 16) |
(cellParams.cellX & 0xFF) << 8 | (cellParams.cellY & 0xFF));
super.addView(child, index, params);
}
@Override
public void requestChildFocus(View child, View focused) {
super.requestChildFocus(child, focused);