Add first RTL support to Launcher

See bug #8064062 Launcher needs to be RTL aware

Change-Id: I24b1f1977fb65246afd2005440567b5850939621
This commit is contained in:
Fabrice Di Meglio 2012-12-18 16:25:49 -08:00
parent ffc9f488a3
commit cc11f74258
43 changed files with 159 additions and 156 deletions

View File

@ -20,7 +20,7 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="40dp"
android:layout_marginStart="40dp"
android:layout_marginTop="40dp">
<LinearLayout
android:layout_width="match_parent"
@ -42,7 +42,7 @@
style="@style/ClingButton"
android:id="@+id/cling_dismiss"
android:layout_marginBottom="15dp"
android:layout_marginRight="10dp"
android:layout_gravity="bottom|right"
android:layout_marginEnd="10dp"
android:layout_gravity="bottom|end"
android:onClick="dismissAllAppsCling" />
</com.android.launcher2.Cling>

View File

@ -20,7 +20,7 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="20dp"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp">
<LinearLayout
android:layout_width="match_parent"
@ -42,7 +42,7 @@
style="@style/ClingButton"
android:id="@+id/cling_dismiss"
android:layout_marginBottom="15dp"
android:layout_marginRight="10dp"
android:layout_gravity="bottom|right"
android:layout_marginEnd="10dp"
android:layout_gravity="bottom|end"
android:onClick="dismissFolderCling" />
</com.android.launcher2.Cling>

View File

@ -25,8 +25,8 @@
android:layout_gravity="center"
android:paddingTop="@dimen/button_bar_width_left_padding"
android:paddingBottom="@dimen/button_bar_width_right_padding"
android:paddingLeft="@dimen/button_bar_height_top_padding"
android:paddingRight="@dimen/button_bar_height_bottom_padding"
android:paddingStart="@dimen/button_bar_height_top_padding"
android:paddingEnd="@dimen/button_bar_height_bottom_padding"
launcher:cellWidth="@dimen/hotseat_cell_width"
launcher:cellHeight="@dimen/hotseat_cell_height"

View File

@ -35,8 +35,8 @@
android:id="@+id/workspace"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/workspace_left_padding"
android:paddingRight="@dimen/workspace_right_padding"
android:paddingStart="@dimen/workspace_left_padding"
android:paddingEnd="@dimen/workspace_right_padding"
android:paddingTop="@dimen/workspace_top_padding"
android:paddingBottom="@dimen/workspace_bottom_padding"
launcher:defaultScreen="2"
@ -58,16 +58,16 @@
layout="@layout/workspace_divider"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/qsb_bar_height"
android:layout_gravity="left" />
android:layout_marginStart="@dimen/qsb_bar_height"
android:layout_gravity="start" />
<include
android:id="@+id/dock_divider"
layout="@layout/workspace_divider"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginRight="@dimen/button_bar_height"
android:layout_gravity="right" />
android:layout_marginEnd="@dimen/button_bar_height"
android:layout_gravity="end" />
<include
android:id="@+id/paged_view_indicator"
@ -80,7 +80,7 @@
android:id="@+id/hotseat"
android:layout_width="@dimen/button_bar_height_plus_padding"
android:layout_height="match_parent"
android:layout_gravity="right" />
android:layout_gravity="end" />
<include
android:id="@+id/qsb_bar"
@ -105,7 +105,7 @@
android:id="@+id/voice_button_proxy"
android:layout_width="@dimen/qsb_bar_height"
android:layout_height="@dimen/app_icon_size"
android:layout_gravity="top|left"
android:layout_gravity="top|start"
android:layout_marginTop="64dp"
android:clickable="true"
android:onClick="onClickVoiceButton"

View File

@ -22,7 +22,7 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="40dp"
android:layout_marginStart="40dp"
android:layout_marginTop="40dp">
<LinearLayout
android:layout_width="match_parent"
@ -44,16 +44,16 @@
style="@style/ClingText"
android:layout_width="180dp"
android:layout_height="wrap_content"
android:layout_marginRight="130dp"
android:layout_gravity="right|center_vertical"
android:gravity="right"
android:layout_marginEnd="130dp"
android:layout_gravity="end|center_vertical"
android:gravity="end"
android:text="@string/workspace_cling_open_all_apps" />
<Button
style="@style/ClingButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:layout_marginRight="10dp"
android:layout_gravity="bottom|right"
android:layout_marginEnd="10dp"
android:layout_gravity="bottom|end"
android:onClick="dismissWorkspaceCling" />
</com.android.launcher2.Cling>

View File

@ -20,7 +20,7 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="20dp"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp">
<LinearLayout
android:layout_width="match_parent"
@ -42,7 +42,7 @@
style="@style/ClingButton"
android:id="@+id/cling_dismiss"
android:layout_marginBottom="15dp"
android:layout_marginRight="10dp"
android:layout_gravity="bottom|right"
android:layout_marginEnd="10dp"
android:layout_gravity="bottom|end"
android:onClick="dismissAllAppsCling" />
</com.android.launcher2.Cling>

View File

@ -20,8 +20,8 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="20dp"
android:layout_marginRight="10dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="10dp"
android:layout_marginTop="@dimen/folderClingMarginTop">
<LinearLayout
android:layout_width="match_parent"
@ -43,7 +43,7 @@
style="@style/ClingButton"
android:id="@+id/cling_dismiss"
android:layout_marginBottom="15dp"
android:layout_marginRight="10dp"
android:layout_gravity="bottom|right"
android:layout_marginEnd="10dp"
android:layout_gravity="bottom|end"
android:onClick="dismissFolderCling" />
</com.android.launcher2.Cling>

View File

@ -25,8 +25,8 @@
android:layout_gravity="center"
android:paddingTop="@dimen/button_bar_height_top_padding"
android:paddingBottom="@dimen/button_bar_height_bottom_padding"
android:paddingLeft="@dimen/button_bar_width_left_padding"
android:paddingRight="@dimen/button_bar_width_right_padding"
android:paddingStart="@dimen/button_bar_width_left_padding"
android:paddingEnd="@dimen/button_bar_width_right_padding"
launcher:cellWidth="@dimen/hotseat_cell_width"
launcher:cellHeight="@dimen/hotseat_cell_height"

View File

@ -57,8 +57,8 @@
android:id="@+id/workspace"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/workspace_left_padding"
android:paddingRight="@dimen/workspace_right_padding"
android:paddingStart="@dimen/workspace_left_padding"
android:paddingEnd="@dimen/workspace_right_padding"
android:paddingTop="@dimen/workspace_top_padding"
android:paddingBottom="@dimen/workspace_bottom_padding"
launcher:defaultScreen="2"
@ -104,7 +104,7 @@
android:id="@+id/voice_button_proxy"
android:layout_width="80dp"
android:layout_height="@dimen/qsb_bar_height"
android:layout_gravity="top|right"
android:layout_gravity="top|end"
android:clickable="true"
android:onClick="onClickVoiceButton"
android:importantForAccessibility="no"

View File

@ -29,10 +29,10 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_toLeftOf="@+id/voice_button_container"
android:paddingLeft="8dp"
android:layout_toStartOf="@+id/voice_button_container"
android:paddingStart="8dp"
android:onClick="onClickSearchButton"
android:focusable="true"
android:clickable="true"
@ -55,8 +55,8 @@
android:layout_gravity="center_vertical"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:paddingRight="8dp"
android:gravity="right"
android:paddingEnd="8dp"
android:gravity="end"
android:onClick="onClickVoiceButton"
android:focusable="true"
android:clickable="true"

View File

@ -22,8 +22,8 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:layout_marginTop="90dp">
<LinearLayout
android:layout_width="match_parent"
@ -45,8 +45,8 @@
style="@style/ClingText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:layout_marginBottom="130dp"
android:layout_gravity="bottom"
android:gravity="center"
@ -56,7 +56,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:layout_marginRight="10dp"
android:layout_gravity="bottom|right"
android:layout_marginEnd="10dp"
android:layout_gravity="bottom|end"
android:onClick="dismissWorkspaceCling" />
</com.android.launcher2.Cling>

View File

@ -20,7 +20,7 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="20dp"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp">
<LinearLayout
android:layout_width="match_parent"
@ -44,7 +44,7 @@
android:minWidth="168dp"
android:textSize="24sp"
android:layout_marginTop="235dp"
android:layout_marginRight="36dp"
android:layout_gravity="top|right"
android:layout_marginEnd="36dp"
android:layout_gravity="top|end"
android:onClick="dismissAllAppsCling" />
</com.android.launcher2.Cling>

View File

@ -20,8 +20,8 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="20dp"
android:layout_marginRight="10dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="10dp"
android:layout_marginTop="@dimen/folderClingMarginTop">
<LinearLayout
android:layout_width="match_parent"
@ -45,7 +45,7 @@
android:minWidth="168dp"
android:textSize="24sp"
android:layout_marginBottom="27dp"
android:layout_marginRight="36dp"
android:layout_gravity="bottom|right"
android:layout_marginEnd="36dp"
android:layout_gravity="bottom|end"
android:onClick="dismissFolderCling" />
</com.android.launcher2.Cling>

View File

@ -20,7 +20,7 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/cling_text_block_offset_x"
android:layout_marginStart="@dimen/cling_text_block_offset_x"
android:layout_marginTop="@dimen/cling_text_block_offset_y">
<LinearLayout
android:layout_width="match_parent"

View File

@ -20,7 +20,7 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/cling_text_block_offset_x"
android:layout_marginStart="@dimen/cling_text_block_offset_x"
android:layout_marginTop="@dimen/cling_text_block_offset_y">
<LinearLayout
android:layout_width="match_parent"

View File

@ -24,7 +24,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="20dp"
android:layout_marginStart="20dp"
android:maxWidth="32dp"
android:maxHeight="32dp"
android:scaleType="fitCenter"
@ -33,7 +33,7 @@
android:id="@+id/provider"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="5dp"
android:layout_marginStart="5dp"
android:gravity="center_vertical"
android:textSize="18sp" />
</LinearLayout>

View File

@ -20,7 +20,7 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/cling_text_block_offset_x"
android:layout_marginStart="@dimen/cling_text_block_offset_x"
android:layout_marginTop="@dimen/cling_text_block_offset_y">
<LinearLayout
android:layout_width="match_parent"

View File

@ -25,8 +25,8 @@
android:layout_gravity="center"
android:paddingTop="@dimen/button_bar_height_top_padding"
android:paddingBottom="@dimen/button_bar_height_bottom_padding"
android:paddingLeft="@dimen/button_bar_width_left_padding"
android:paddingRight="@dimen/button_bar_width_right_padding"
android:paddingStart="@dimen/button_bar_width_left_padding"
android:paddingEnd="@dimen/button_bar_width_right_padding"
launcher:cellWidth="@dimen/hotseat_cell_width"
launcher:cellHeight="@dimen/hotseat_cell_height"

View File

@ -57,8 +57,8 @@
android:id="@+id/workspace"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/workspace_left_padding"
android:paddingRight="@dimen/workspace_right_padding"
android:paddingStart="@dimen/workspace_left_padding"
android:paddingEnd="@dimen/workspace_right_padding"
android:paddingTop="@dimen/workspace_top_padding"
android:paddingBottom="@dimen/workspace_bottom_padding"
launcher:defaultScreen="2"
@ -104,8 +104,8 @@
android:id="@+id/voice_button_proxy"
android:layout_width="80dp"
android:layout_height="@dimen/qsb_bar_height"
android:layout_marginRight="@dimen/qsb_voice_proxy_padding_right"
android:layout_gravity="top|right"
android:layout_marginEnd="@dimen/qsb_voice_proxy_padding_right"
android:layout_gravity="top|end"
android:clickable="true"
android:onClick="onClickVoiceButton"
android:importantForAccessibility="no"

View File

@ -18,8 +18,8 @@
style="@style/MarketButton"
android:onClick="onClickAppMarketButton"
android:gravity="center"
android:paddingLeft="32dp"
android:paddingRight="32dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:drawablePadding="10dp"
android:background="@drawable/tab_widget_indicator_selector"
android:text="@string/market"

View File

@ -29,10 +29,10 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_toLeftOf="@+id/voice_button_container"
android:paddingLeft="8dp"
android:layout_toStartOf="@+id/voice_button_container"
android:paddingStart="8dp"
android:onClick="onClickSearchButton"
android:focusable="true"
android:clickable="true"
@ -55,8 +55,8 @@
android:layout_gravity="center_vertical"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:paddingRight="8dp"
android:gravity="right"
android:paddingEnd="8dp"
android:gravity="end"
android:onClick="onClickVoiceButton"
android:focusable="true"
android:clickable="true"

View File

@ -19,8 +19,8 @@
<com.android.launcher2.Workspace
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
android:paddingLeft="@dimen/workspace_left_padding"
android:paddingRight="@dimen/workspace_right_padding"
android:paddingStart="@dimen/workspace_left_padding"
android:paddingEnd="@dimen/workspace_right_padding"
android:paddingTop="@dimen/workspace_top_padding"
android:paddingBottom="@dimen/workspace_bottom_padding"
launcher:defaultScreen="2"

View File

@ -22,8 +22,8 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:layout_marginTop="90dp">
<LinearLayout
android:layout_width="match_parent"
@ -45,8 +45,8 @@
style="@style/ClingText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:layout_marginBottom="130dp"
android:layout_gravity="bottom"
android:gravity="center"
@ -56,7 +56,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:layout_marginRight="10dp"
android:layout_gravity="bottom|right"
android:layout_marginEnd="10dp"
android:layout_gravity="bottom|end"
android:onClick="dismissWorkspaceCling" />
</com.android.launcher2.Cling>

View File

@ -21,5 +21,5 @@
android:textAppearance="?android:attr/textAppearanceLarge"
android:gravity="center_vertical"
android:drawablePadding="14dip"
android:paddingLeft="15dip"
android:paddingRight="15dip" />
android:paddingStart="15dip"
android:paddingEnd="15dip" />

View File

@ -22,8 +22,7 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
android:layoutDirection="ltr">
android:visibility="gone">
<!-- The layout_width of the tab bar gets overriden to align the content
with the text in the tabs in AppsCustomizeTabHost. -->
<FrameLayout
@ -36,7 +35,8 @@
android:id="@android:id/tabs"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="left"
android:layout_gravity="center"
android:gravity="start"
android:background="@drawable/tab_unselected_holo"
android:tabStripEnabled="false"
android:divider="@null" />
@ -45,7 +45,7 @@
layout="@layout/market_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="right" />
android:layout_gravity="end" />
</FrameLayout>
<FrameLayout
android:id="@android:id/tabcontent"

View File

@ -32,8 +32,8 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingTop="@dimen/app_widget_preview_padding_top"
android:paddingLeft="@dimen/app_widget_preview_padding_left"
android:paddingRight="@dimen/app_widget_preview_padding_right"
android:paddingStart="@dimen/app_widget_preview_padding_left"
android:paddingEnd="@dimen/app_widget_preview_padding_right"
android:scaleType="matrix"
android:background="@drawable/widget_container_holo" />
@ -41,8 +41,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/app_widget_preview_label_margin_top"
android:layout_marginLeft="@dimen/app_widget_preview_label_margin_left"
android:layout_marginRight="@dimen/app_widget_preview_label_margin_right"
android:layout_marginStart="@dimen/app_widget_preview_label_margin_left"
android:layout_marginEnd="@dimen/app_widget_preview_label_margin_right"
android:orientation="horizontal">
<!-- The name of the widget. -->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
@ -50,13 +50,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="left"
android:gravity="start"
android:singleLine="true"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:textColor="#FFFFFFFF"
android:textSize="13sp" />
android:textSize="13sp"
android:textAlignment="viewStart" />
<!-- The original dimensions of the widget (can't be the same text as above due to different
style. -->
@ -65,9 +66,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="5dp"
android:layout_marginStart="5dp"
android:layout_weight="0"
android:gravity="left"
android:gravity="start"
android:textColor="#FF555555"
android:textSize="12sp" />

View File

@ -19,8 +19,8 @@
android:layout_height="wrap_content"
android:paddingTop="10dip"
android:paddingBottom="10dip"
android:paddingLeft="20dip"
android:paddingRight="20dip"
android:paddingStart="20dip"
android:paddingEnd="20dip"
android:gravity="center"
android:background="@drawable/bg_appwidget_error"
android:textAppearance="?android:attr/textAppearanceMediumInverse"

View File

@ -26,7 +26,7 @@
android:textSize="20dp"
android:textColor="@android:color/holo_blue_light"
android:text="@string/dummy_custom_cling_error_message"
android:gravity="left"
android:layout_gravity="bottom|left"
android:gravity="start"
android:layout_gravity="bottom|start"
/>
</com.android.launcher2.Cling>

View File

@ -18,8 +18,8 @@
style="@style/MarketButton"
android:onClick="onClickAppMarketButton"
android:gravity="center"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:background="@drawable/tab_widget_indicator_selector"
android:contentDescription="@string/market"
android:shadowColor="@color/workspace_all_apps_and_delete_zone_text_shadow_color"

View File

@ -25,7 +25,7 @@
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/rename_folder_label"
android:gravity="left"
android:gravity="start"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText

View File

@ -26,8 +26,8 @@
android:id="@+id/folder_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/folder_padding"
android:paddingRight="@dimen/folder_padding"
android:paddingStart="@dimen/folder_padding"
android:paddingEnd="@dimen/folder_padding"
android:paddingTop="@dimen/folder_padding"
android:paddingBottom="@dimen/folder_padding"
android:cacheColorHint="#ff333333"

View File

@ -15,8 +15,8 @@
-->
<ImageView
xmlns:android="http://schemas.android.com/apk/res/android"
android:paddingLeft="@dimen/workspace_divider_padding_left"
android:paddingRight="@dimen/workspace_divider_padding_right"
android:paddingStart="@dimen/workspace_divider_padding_left"
android:paddingEnd="@dimen/workspace_divider_padding_right"
android:paddingTop="@dimen/workspace_divider_padding_top"
android:paddingBottom="@dimen/workspace_divider_padding_bottom"
android:scaleType="fitXY"

View File

@ -20,8 +20,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/cell_layout_left_padding"
android:paddingRight="@dimen/cell_layout_right_padding"
android:paddingStart="@dimen/cell_layout_left_padding"
android:paddingEnd="@dimen/cell_layout_right_padding"
android:paddingTop="@dimen/cell_layout_top_padding"
android:paddingBottom="@dimen/cell_layout_bottom_padding"
android:hapticFeedbackEnabled="false"

View File

@ -23,7 +23,7 @@
<item name="android:orientation">vertical</item>
<item name="android:layout_width">@dimen/qsb_bar_height</item>
<item name="android:layout_height">match_parent</item>
<item name="android:layout_gravity">left</item>
<item name="android:layout_gravity">start</item>
</style>
<style name="SearchDropTargetBar">
<item name="android:orientation">vertical</item>
@ -35,8 +35,8 @@
<item name="android:layout_gravity">center_horizontal</item>
<item name="android:paddingTop">@dimen/toolbar_button_vertical_padding</item>
<item name="android:paddingBottom">@dimen/toolbar_button_vertical_padding</item>
<item name="android:paddingLeft">@dimen/toolbar_button_horizontal_padding</item>
<item name="android:paddingRight">@dimen/toolbar_button_horizontal_padding</item>
<item name="android:paddingStart">@dimen/toolbar_button_horizontal_padding</item>
<item name="android:paddingEnd">@dimen/toolbar_button_horizontal_padding</item>
</style>
<style name="DropTargetButtonContainer">
<item name="android:layout_width">match_parent</item>
@ -49,8 +49,8 @@
<item name="android:gravity">center</item>
<item name="android:paddingTop">@dimen/toolbar_button_vertical_padding</item>
<item name="android:paddingBottom">@dimen/toolbar_button_vertical_padding</item>
<item name="android:paddingLeft">@dimen/toolbar_button_horizontal_padding</item>
<item name="android:paddingRight">@dimen/toolbar_button_horizontal_padding</item>
<item name="android:paddingStart">@dimen/toolbar_button_horizontal_padding</item>
<item name="android:paddingEnd">@dimen/toolbar_button_horizontal_padding</item>
<item name="android:shadowColor">#DD000000</item>
<item name="android:shadowDx">0.0</item>
<item name="android:shadowDy">1.0</item>

View File

@ -23,6 +23,6 @@
<item name="android:orientation">vertical</item>
<item name="android:layout_width">@dimen/qsb_bar_height</item>
<item name="android:layout_height">match_parent</item>
<item name="android:layout_gravity">left|center_vertical</item>
<item name="android:layout_gravity">start|center_vertical</item>
</style>
</resources>

View File

@ -36,8 +36,8 @@
<item name="android:background">@null</item>
<item name="android:paddingTop">4dp</item>
<item name="android:paddingBottom">0dp</item>
<item name="android:paddingLeft">0dp</item>
<item name="android:paddingRight">0dp</item>
<item name="android:paddingStart">0dp</item>
<item name="android:paddingEnd">0dp</item>
<item name="android:drawablePadding">6dp</item>
</style>
</resources>

View File

@ -23,8 +23,8 @@
<item name="android:layout_height">wrap_content</item>
<item name="android:paddingTop">10dp</item>
<item name="android:paddingBottom">15dp</item>
<item name="android:paddingLeft">35dp</item>
<item name="android:paddingRight">35dp</item>
<item name="android:paddingStart">35dp</item>
<item name="android:paddingEnd">35dp</item>
<item name="android:text">@string/cling_dismiss</item>
<item name="android:textStyle">bold</item>
<item name="android:background">@drawable/cling_button_bg</item>

View File

@ -24,8 +24,8 @@
<item name="android:layout_height">wrap_content</item>
<item name="android:paddingTop">10dp</item>
<item name="android:paddingBottom">15dp</item>
<item name="android:paddingLeft">35dp</item>
<item name="android:paddingRight">35dp</item>
<item name="android:paddingStart">35dp</item>
<item name="android:paddingEnd">35dp</item>
<item name="android:text">@string/cling_dismiss</item>
<item name="android:textSize">20sp</item>
<item name="android:textStyle">bold</item>
@ -53,8 +53,8 @@
<!-- Workspace -->
<style name="WorkspaceIcon.Portrait">
<item name="android:drawablePadding">0dp</item>
<item name="android:paddingLeft">4dp</item>
<item name="android:paddingRight">4dp</item>
<item name="android:paddingStart">4dp</item>
<item name="android:paddingEnd">4dp</item>
<item name="android:paddingTop">@dimen/app_icon_padding_top</item>
<item name="android:paddingBottom">4dp</item>
<item name="android:textSize">13sp</item>
@ -62,8 +62,8 @@
<style name="WorkspaceIcon.Portrait.Folder">
<item name="android:shadowRadius">0.0</item> <!-- Don't use text shadow -->
<item name="android:drawablePadding">0dp</item>
<item name="android:paddingLeft">4dp</item>
<item name="android:paddingRight">4dp</item>
<item name="android:paddingStart">4dp</item>
<item name="android:paddingEnd">4dp</item>
<item name="android:paddingTop">0dp</item>
<item name="android:paddingBottom">0dp</item>
<item name="android:textSize">13sp</item>
@ -71,8 +71,8 @@
</style>
<style name="WorkspaceIcon.Landscape">
<item name="android:drawablePadding">0dp</item>
<item name="android:paddingLeft">4dp</item>
<item name="android:paddingRight">4dp</item>
<item name="android:paddingStart">4dp</item>
<item name="android:paddingEnd">4dp</item>
<item name="android:paddingTop">@dimen/app_icon_padding_top</item>
<item name="android:paddingBottom">4dp</item>
<item name="android:textSize">13sp</item>
@ -80,8 +80,8 @@
<style name="WorkspaceIcon.Landscape.Folder">
<item name="android:shadowRadius">0.0</item> <!-- Don't use text shadow -->
<item name="android:drawablePadding">0dp</item>
<item name="android:paddingLeft">4dp</item>
<item name="android:paddingRight">4dp</item>
<item name="android:paddingStart">4dp</item>
<item name="android:paddingEnd">4dp</item>
<item name="android:paddingTop">0dp</item>
<item name="android:paddingBottom">0dp</item>
<item name="android:textSize">13sp</item>
@ -101,8 +101,8 @@
<item name="android:background">@null</item>
<item name="android:paddingTop">0dp</item>
<item name="android:paddingBottom">0dp</item>
<item name="android:paddingLeft">0dp</item>
<item name="android:paddingRight">0dp</item>
<item name="android:paddingStart">0dp</item>
<item name="android:paddingEnd">0dp</item>
<item name="android:drawablePadding">4dp</item>
<item name="android:textSize">13sp</item>
</style>
@ -115,8 +115,8 @@
<item name="android:textSize">13sp</item>
</style>
<style name="TabIndicator.AppsCustomize">
<item name="android:paddingLeft">32dp</item>
<item name="android:paddingRight">32dp</item>
<item name="android:paddingStart">32dp</item>
<item name="android:paddingEnd">32dp</item>
<item name="android:textSize">14sp</item>
<item name="android:maxWidth">240dp</item>
</style>
@ -127,8 +127,8 @@
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">@dimen/qsb_bar_height</item>
<item name="android:layout_gravity">top|center_horizontal</item>
<item name="android:paddingLeft">@dimen/qsb_padding_left</item>
<item name="android:paddingRight">@dimen/qsb_padding_right</item>
<item name="android:paddingStart">@dimen/qsb_padding_left</item>
<item name="android:paddingEnd">@dimen/qsb_padding_right</item>
</style>
<style name="SearchDropTargetBar">
<item name="android:orientation">horizontal</item>
@ -151,8 +151,8 @@
<item name="android:layout_gravity">center</item>
<item name="android:gravity">center_vertical</item>
<item name="android:drawablePadding">7.5dp</item>
<item name="android:paddingLeft">60dp</item>
<item name="android:paddingRight">60dp</item>
<item name="android:paddingStart">60dp</item>
<item name="android:paddingEnd">60dp</item>
<item name="android:textColor">#FFFFFFFF</item>
<item name="android:textSize">16sp</item>
<item name="android:shadowColor">#393939</item>

View File

@ -46,10 +46,10 @@
in the Phone UI. [CHAR LIMIT=32] -->
<string name="market">Shop</string>
<!-- The format string for the dimensions of a widget in the drawer -->
<string name="widget_dims_format" translatable="false">%1$d x %2$d</string>
<string name="widget_dims_format" translatable="false">%1$d \u00d7 %2$d</string>
<!-- External-drop widget pick label format string [CHAR_LIMIT=25] -->
<string name="external_drop_widget_pick_format" translatable="false">%1$s (%2$d x %3$d)</string>
<string name="external_drop_widget_pick_format" translatable="false">%1$s (%2$d \u00d7 %3$d)</string>
<!-- External-drop widget error string. This is the error that is shown
when you drag and item into the homescreen and it is unable to fit,
or an error is encountered. [CHAR_LIMIT=50] -->

View File

@ -29,8 +29,8 @@
<item name="android:layout_height">wrap_content</item>
<item name="android:paddingTop">10dp</item>
<item name="android:paddingBottom">15dp</item>
<item name="android:paddingLeft">35dp</item>
<item name="android:paddingRight">35dp</item>
<item name="android:paddingStart">35dp</item>
<item name="android:paddingEnd">35dp</item>
<item name="android:text">@string/cling_dismiss</item>
<item name="android:textStyle">bold</item>
<item name="android:background">@drawable/cling_button_bg</item>
@ -71,16 +71,16 @@
<style name="WorkspaceIcon.Portrait">
<item name="android:drawablePadding">@dimen/app_icon_drawable_padding</item>
<item name="android:paddingLeft">4dp</item>
<item name="android:paddingRight">4dp</item>
<item name="android:paddingStart">4dp</item>
<item name="android:paddingEnd">4dp</item>
<item name="android:paddingTop">@dimen/app_icon_padding_top</item>
<item name="android:paddingBottom">4dp</item>
</style>
<style name="WorkspaceIcon.Landscape">
<item name="android:drawablePadding">@dimen/app_icon_drawable_padding_land</item>
<item name="android:paddingLeft">4dp</item>
<item name="android:paddingRight">4dp</item>
<item name="android:paddingStart">4dp</item>
<item name="android:paddingEnd">4dp</item>
<item name="android:paddingTop">@dimen/app_icon_padding_top</item>
<item name="android:paddingBottom">4dp</item>
</style>
@ -104,8 +104,8 @@
<item name="android:background">@null</item>
<item name="android:paddingTop">0dp</item>
<item name="android:paddingBottom">0dp</item>
<item name="android:paddingLeft">0dp</item>
<item name="android:paddingRight">0dp</item>
<item name="android:paddingStart">0dp</item>
<item name="android:paddingEnd">0dp</item>
<item name="android:drawablePadding">2dp</item>
</style>
<style name="WorkspaceIcon.Landscape.AppsCustomize">
@ -121,8 +121,8 @@
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">@dimen/qsb_bar_height</item>
<item name="android:layout_gravity">top|center_horizontal</item>
<item name="android:paddingLeft">@dimen/qsb_padding_left</item>
<item name="android:paddingRight">@dimen/qsb_padding_right</item>
<item name="android:paddingStart">@dimen/qsb_padding_left</item>
<item name="android:paddingEnd">@dimen/qsb_padding_right</item>
</style>
<style name="SearchDropTargetBar">
<item name="android:orientation">horizontal</item>
@ -145,8 +145,8 @@
<item name="android:layout_gravity">center</item>
<item name="android:gravity">center_vertical</item>
<item name="android:drawablePadding">7.5dp</item>
<item name="android:paddingLeft">25dp</item>
<item name="android:paddingRight">25dp</item>
<item name="android:paddingStart">25dp</item>
<item name="android:paddingEnd">25dp</item>
<item name="android:textColor">#FFFFFFFF</item>
<item name="android:textSize">16sp</item>
<item name="android:singleLine">true</item>
@ -161,8 +161,8 @@
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">match_parent</item>
<item name="android:gravity">center</item>
<item name="android:paddingLeft">20dp</item>
<item name="android:paddingRight">20dp</item>
<item name="android:paddingStart">20dp</item>
<item name="android:paddingEnd">20dp</item>
<item name="android:background">@drawable/tab_widget_indicator_selector</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:textSize">12sp</item>
@ -176,8 +176,8 @@
</style>
<style name="MarketButton">
<item name="android:paddingLeft">5dp</item>
<item name="android:paddingRight">5dp</item>
<item name="android:paddingStart">5dp</item>
<item name="android:paddingEnd">5dp</item>
<item name="android:textColor">@color/workspace_all_apps_and_delete_zone_text_color</item>
<item name="android:textSize">18sp</item>
<item name="android:shadowColor">@color/workspace_all_apps_and_delete_zone_text_shadow_color</item>

View File

@ -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);

View File

@ -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);

View File

@ -51,7 +51,9 @@ public class InfoDropTarget extends ButtonDropTarget {
Resources r = getResources();
mHoverColor = r.getColor(R.color.info_target_hover_tint);
mDrawable = (TransitionDrawable) getCurrentDrawable();
if (null != mDrawable) {
mDrawable.setCrossFadeEnabled(true);
}
// Remove the text in the Phone UI in landscape
int orientation = getResources().getConfiguration().orientation;