Cleaning up widget preview loader

> Removing unnecessary canvas cache
> Removing unnecessary new bitmap creation

Change-Id: Ic9f45c5a204ea4d32dbf93c21a6a7fd6baea4b51
This commit is contained in:
Sunny Goyal
2015-03-18 15:56:30 -07:00
parent 6b6ffbe907
commit 4cad7538c9
4 changed files with 104 additions and 261 deletions
@@ -348,22 +348,6 @@ public class PagedViewCellLayout extends ViewGroup implements Page {
requestLayout();
}
/**
* Estimates the width that the number of hSpan cells will take up.
*/
public int estimateCellWidth(int hSpan) {
// TODO: we need to take widthGap into effect
return hSpan * mCellWidth;
}
/**
* Estimates the height that the number of vSpan cells will take up.
*/
public int estimateCellHeight(int vSpan) {
// TODO: we need to take heightGap into effect
return vSpan * mCellHeight;
}
@Override
public ViewGroup.LayoutParams generateLayoutParams(AttributeSet attrs) {
return new PagedViewCellLayout.LayoutParams(getContext(), attrs);