Introducing CellPosMapper which allows mapping between UI position
and model position Test: atest CellPosMapperTest Bug: 188081026 Change-Id: If5c6b3df5ad240317bb535c675f6ead94084238e
This commit is contained in:
1 parent
150b7b0497
commit
669b71f5b3
17 files changed
+385
-88
No files matched your search
@@ -29,8 +29,6 @@ import androidx.annotation.Nullable;
|
||||
*/
|
||||
public class CellLayoutLayoutParams extends ViewGroup.MarginLayoutParams {
|
||||
|
||||
private int mScreenId = -1;
|
||||
|
||||
@ViewDebug.ExportedProperty
|
||||
private int mCellX;
|
||||
|
||||
@@ -97,20 +95,17 @@ public class CellLayoutLayoutParams extends ViewGroup.MarginLayoutParams {
|
||||
this.mCellY = source.getCellY();
|
||||
this.cellHSpan = source.cellHSpan;
|
||||
this.cellVSpan = source.cellVSpan;
|
||||
this.mScreenId = source.getScreenId();
|
||||
this.mTmpCellX = source.getTmpCellX();
|
||||
this.mTmpCellY = source.getTmpCellY();
|
||||
this.useTmpCoords = source.useTmpCoords;
|
||||
}
|
||||
|
||||
public CellLayoutLayoutParams(int cellX, int cellY, int cellHSpan, int cellVSpan,
|
||||
int screenId) {
|
||||
public CellLayoutLayoutParams(int cellX, int cellY, int cellHSpan, int cellVSpan) {
|
||||
super(CellLayoutLayoutParams.MATCH_PARENT, CellLayoutLayoutParams.MATCH_PARENT);
|
||||
this.mCellX = cellX;
|
||||
this.mCellY = cellY;
|
||||
this.cellHSpan = cellHSpan;
|
||||
this.cellVSpan = cellVSpan;
|
||||
this.mScreenId = screenId;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -178,14 +173,6 @@ public class CellLayoutLayoutParams extends ViewGroup.MarginLayoutParams {
|
||||
return "(" + this.getCellX() + ", " + this.getCellY() + ")";
|
||||
}
|
||||
|
||||
public int getScreenId() {
|
||||
return mScreenId;
|
||||
}
|
||||
|
||||
public void setScreenId(int screenId) {
|
||||
this.mScreenId = screenId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Horizontal location of the item in the grid.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user