Merge "Add first RTL support to Launcher"

This commit is contained in:
Fabrice Di Meglio
2013-01-24 21:50:23 +00:00
committed by Android (Google) Code Review
43 changed files with 159 additions and 156 deletions
@@ -96,13 +96,13 @@ public class AppWidgetResizeFrame extends FrameLayout {
mLeftHandle = new ImageView(context);
mLeftHandle.setImageResource(R.drawable.widget_resize_handle_left);
lp = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT,
Gravity.LEFT | Gravity.CENTER_VERTICAL);
Gravity.START | Gravity.CENTER_VERTICAL);
addView(mLeftHandle, lp);
mRightHandle = new ImageView(context);
mRightHandle.setImageResource(R.drawable.widget_resize_handle_right);
lp = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT,
Gravity.RIGHT | Gravity.CENTER_VERTICAL);
Gravity.END | Gravity.CENTER_VERTICAL);
addView(mRightHandle, lp);
mTopHandle = new ImageView(context);
@@ -1451,11 +1451,11 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
int ix = i % mWidgetCountX;
int iy = i / mWidgetCountX;
GridLayout.LayoutParams lp = new GridLayout.LayoutParams(
GridLayout.spec(iy, GridLayout.LEFT),
GridLayout.spec(iy, GridLayout.START),
GridLayout.spec(ix, GridLayout.TOP));
lp.width = cellWidth;
lp.height = cellHeight;
lp.setGravity(Gravity.TOP | Gravity.LEFT);
lp.setGravity(Gravity.TOP | Gravity.START);
if (ix > 0) lp.leftMargin = mWidgetWidthGap;
if (iy > 0) lp.topMargin = mWidgetHeightGap;
layout.addView(widget, lp);
@@ -51,7 +51,9 @@ public class InfoDropTarget extends ButtonDropTarget {
Resources r = getResources();
mHoverColor = r.getColor(R.color.info_target_hover_tint);
mDrawable = (TransitionDrawable) getCurrentDrawable();
mDrawable.setCrossFadeEnabled(true);
if (null != mDrawable) {
mDrawable.setCrossFadeEnabled(true);
}
// Remove the text in the Phone UI in landscape
int orientation = getResources().getConfiguration().orientation;