Merge "Add first RTL support to Launcher"
This commit is contained in:
committed by
Android (Google) Code Review
commit
892d023c54
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user