resolved conflicts for merge of 13ef17a3 to mnc-dr-dev
b/22609402 Change-Id: I140cf972d57e14737a6f91c0b4a8ec6c7ff1af2b
This commit is contained in:
1 parent
a83129f0bc
commit
e612775922
630 files changed
+23760
-21646
No files matched your search
@@ -23,6 +23,7 @@ import android.graphics.Paint;
|
||||
import android.graphics.Rect;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewGroup.LayoutParams;
|
||||
|
||||
public class ShortcutAndWidgetContainer extends ViewGroup {
|
||||
static final String TAG = "CellLayoutChildren";
|
||||
@@ -44,10 +45,13 @@ public class ShortcutAndWidgetContainer extends ViewGroup {
|
||||
private int mCountX;
|
||||
private int mCountY;
|
||||
|
||||
private Launcher mLauncher;
|
||||
|
||||
private boolean mInvertIfRtl = false;
|
||||
|
||||
public ShortcutAndWidgetContainer(Context context) {
|
||||
super(context);
|
||||
mLauncher = (Launcher) context;
|
||||
mWallpaperManager = WallpaperManager.getInstance(context);
|
||||
}
|
||||
|
||||
@@ -124,22 +128,19 @@ public class ShortcutAndWidgetContainer extends ViewGroup {
|
||||
}
|
||||
|
||||
int getCellContentWidth() {
|
||||
final LauncherAppState app = LauncherAppState.getInstance();
|
||||
final DeviceProfile grid = app.getDynamicGrid().getDeviceProfile();
|
||||
final DeviceProfile grid = mLauncher.getDeviceProfile();
|
||||
return Math.min(getMeasuredHeight(), mIsHotseatLayout ?
|
||||
grid.hotseatCellWidthPx: grid.cellWidthPx);
|
||||
}
|
||||
|
||||
int getCellContentHeight() {
|
||||
final LauncherAppState app = LauncherAppState.getInstance();
|
||||
final DeviceProfile grid = app.getDynamicGrid().getDeviceProfile();
|
||||
final DeviceProfile grid = mLauncher.getDeviceProfile();
|
||||
return Math.min(getMeasuredHeight(), mIsHotseatLayout ?
|
||||
grid.hotseatCellHeightPx : grid.cellHeightPx);
|
||||
}
|
||||
|
||||
public void measureChild(View child) {
|
||||
final LauncherAppState app = LauncherAppState.getInstance();
|
||||
final DeviceProfile grid = app.getDynamicGrid().getDeviceProfile();
|
||||
final DeviceProfile grid = mLauncher.getDeviceProfile();
|
||||
final int cellWidth = mCellWidth;
|
||||
final int cellHeight = mCellHeight;
|
||||
CellLayout.LayoutParams lp = (CellLayout.LayoutParams) child.getLayoutParams();
|
||||
@@ -168,12 +169,8 @@ public class ShortcutAndWidgetContainer extends ViewGroup {
|
||||
child.measure(childWidthMeasureSpec, childheightMeasureSpec);
|
||||
}
|
||||
|
||||
private boolean invertLayoutHorizontally() {
|
||||
return mInvertIfRtl && isLayoutRtl();
|
||||
}
|
||||
|
||||
public boolean isLayoutRtl() {
|
||||
return (getLayoutDirection() == LAYOUT_DIRECTION_RTL);
|
||||
public boolean invertLayoutHorizontally() {
|
||||
return mInvertIfRtl && Utilities.isRtl(getResources());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user