Merge "Make SystemUI RTL aware"

This commit is contained in:
Fabrice Di Meglio
2012-12-17 17:44:38 -08:00
committed by Android (Google) Code Review
106 changed files with 329 additions and 174 deletions

View File

@ -121,6 +121,12 @@ public class SizeAdaptiveLayout extends ViewGroup {
mTransitionAnimation.addListener(mAnimatorListener); mTransitionAnimation.addListener(mAnimatorListener);
} }
@Override
public void setLayoutDirection(int layoutDirection) {
super.setLayoutDirection(layoutDirection);
mModestyPanel.setLayoutDirection(layoutDirection);
}
/** /**
* Visible for testing * Visible for testing
* @hide * @hide
@ -225,13 +231,11 @@ public class SizeAdaptiveLayout extends ViewGroup {
if (unboundedView != null) { if (unboundedView != null) {
tallestView = unboundedView; tallestView = unboundedView;
} }
if (heightMode == MeasureSpec.UNSPECIFIED) { if (heightMode == MeasureSpec.UNSPECIFIED || heightSize > tallestViewSize) {
return tallestView; return tallestView;
} else {
return smallestView;
} }
if (heightSize > tallestViewSize) {
return tallestView;
}
return smallestView;
} }
@Override @Override
@ -242,6 +246,7 @@ public class SizeAdaptiveLayout extends ViewGroup {
View.MeasureSpec.EXACTLY); View.MeasureSpec.EXACTLY);
mActiveChild = selectActiveChild(measureSpec); mActiveChild = selectActiveChild(measureSpec);
mActiveChild.setVisibility(View.VISIBLE); mActiveChild.setVisibility(View.VISIBLE);
mActiveChild.setLayoutDirection(getLayoutDirection());
if (mLastActive != mActiveChild && mLastActive != null) { if (mLastActive != mActiveChild && mLastActive != null) {
if (DEBUG) Log.d(TAG, this + " changed children from: " + mLastActive + if (DEBUG) Log.d(TAG, this + " changed children from: " + mLastActive +
@ -272,10 +277,10 @@ public class SizeAdaptiveLayout extends ViewGroup {
final int childWidth = mActiveChild.getMeasuredWidth(); final int childWidth = mActiveChild.getMeasuredWidth();
final int childHeight = mActiveChild.getMeasuredHeight(); final int childHeight = mActiveChild.getMeasuredHeight();
// TODO investigate setting LAYER_TYPE_HARDWARE on mLastActive // TODO investigate setting LAYER_TYPE_HARDWARE on mLastActive
mActiveChild.layout(0, 0, 0 + childWidth, 0 + childHeight); mActiveChild.layout(0, 0, childWidth, childHeight);
if (DEBUG) Log.d(TAG, "got modesty offset of " + mModestyPanelTop); if (DEBUG) Log.d(TAG, "got modesty offset of " + mModestyPanelTop);
mModestyPanel.layout(0, mModestyPanelTop, 0 + childWidth, mModestyPanelTop + childHeight); mModestyPanel.layout(0, mModestyPanelTop, childWidth, mModestyPanelTop + childHeight);
} }
@Override @Override

View File

@ -68,7 +68,8 @@
android:allowBackup="false" android:allowBackup="false"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:label="@string/app_label" android:label="@string/app_label"
android:icon="@*android:drawable/platlogo"> android:icon="@*android:drawable/platlogo"
android:supportsRtl="true">
<!-- Broadcast receiver that gets the broadcast at boot time and starts <!-- Broadcast receiver that gets the broadcast at boot time and starts
up everything else. up everything else.

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 983 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 904 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 533 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 725 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 748 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 921 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 617 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 661 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 736 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 735 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 724 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 866 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 980 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 646 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 552 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 626 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 951 B

View File

@ -27,7 +27,7 @@
android:background="#DD000000" android:background="#DD000000"
android:focusable="true" android:focusable="true"
android:orientation="horizontal" android:orientation="horizontal"
android:gravity="top|left" android:gravity="top|start"
> >
<ImageView <ImageView

View File

@ -38,10 +38,10 @@
<FrameLayout android:id="@+id/app_thumbnail" <FrameLayout android:id="@+id/app_thumbnail"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:layout_alignParentStart="true"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:layout_marginTop="@dimen/status_bar_recents_thumbnail_top_margin" android:layout_marginTop="@dimen/status_bar_recents_thumbnail_top_margin"
android:layout_marginLeft="@dimen/status_bar_recents_thumbnail_left_margin" android:layout_marginStart="@dimen/status_bar_recents_thumbnail_left_margin"
android:background="@drawable/recents_thumbnail_bg" android:background="@drawable/recents_thumbnail_bg"
android:foreground="@drawable/recents_thumbnail_fg" android:foreground="@drawable/recents_thumbnail_fg"
android:visibility="invisible"> android:visibility="invisible">
@ -55,8 +55,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/status_bar_recents_app_icon_top_margin" android:layout_marginTop="@dimen/status_bar_recents_app_icon_top_margin"
android:layout_marginLeft="@dimen/status_bar_recents_app_icon_left_margin" android:layout_marginStart="@dimen/status_bar_recents_app_icon_left_margin"
android:layout_alignParentLeft="true" android:layout_alignParentStart="true"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:maxWidth="@dimen/status_bar_recents_app_icon_max_width" android:maxWidth="@dimen/status_bar_recents_app_icon_max_width"
android:maxHeight="@dimen/status_bar_recents_app_icon_max_height" android:maxHeight="@dimen/status_bar_recents_app_icon_max_height"
@ -75,7 +75,7 @@
android:layout_alignLeft="@id/app_thumbnail" android:layout_alignLeft="@id/app_thumbnail"
android:layout_below="@id/app_thumbnail" android:layout_below="@id/app_thumbnail"
android:layout_marginTop="@dimen/status_bar_recents_text_description_padding" android:layout_marginTop="@dimen/status_bar_recents_text_description_padding"
android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin" android:layout_marginStart="@dimen/status_bar_recents_app_label_left_margin"
android:singleLine="true" android:singleLine="true"
android:ellipsize="marquee" android:ellipsize="marquee"
android:textColor="@color/status_bar_recents_app_label_color" android:textColor="@color/status_bar_recents_app_label_color"
@ -89,7 +89,7 @@
android:fadingEdge="horizontal" android:fadingEdge="horizontal"
android:fadingEdgeLength="@dimen/status_bar_recents_text_fading_edge_length" android:fadingEdgeLength="@dimen/status_bar_recents_text_fading_edge_length"
android:scrollHorizontally="true" android:scrollHorizontally="true"
android:layout_alignLeft="@id/app_thumbnail" android:layout_alignStart="@id/app_thumbnail"
android:layout_below="@id/app_label" android:layout_below="@id/app_label"
android:layout_marginTop="@dimen/status_bar_recents_text_description_padding" android:layout_marginTop="@dimen/status_bar_recents_text_description_padding"
android:singleLine="true" android:singleLine="true"

View File

@ -40,7 +40,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:fadingEdge="horizontal" android:fadingEdge="horizontal"
android:scrollbars="none" android:scrollbars="none"
android:layout_gravity="right" android:layout_gravity="end"
android:fadingEdgeLength="@dimen/status_bar_recents_scroll_fading_edge_length"> android:fadingEdgeLength="@dimen/status_bar_recents_scroll_fading_edge_length">
<LinearLayout android:id="@+id/recents_linear_layout" <LinearLayout android:id="@+id/recents_linear_layout"

View File

@ -44,7 +44,7 @@
android:layout_width="@dimen/navbar_search_panel_height" android:layout_width="@dimen/navbar_search_panel_height"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:gravity="left" android:gravity="start"
prvandroid:targetDrawables="@array/navbar_search_targets" prvandroid:targetDrawables="@array/navbar_search_targets"
prvandroid:targetDescriptions="@array/navbar_search_target_descriptions" prvandroid:targetDescriptions="@array/navbar_search_target_descriptions"

View File

@ -45,7 +45,7 @@
android:layout_width="48dp" android:layout_width="48dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="0" android:layout_weight="0"
android:layout_marginLeft="2dp" android:layout_marginStart="2dp"
android:visibility="invisible" android:visibility="invisible"
/> />
<Space <Space
@ -89,7 +89,7 @@
android:layout_width="48dp" android:layout_width="48dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:src="@drawable/ic_sysbar_menu" android:src="@drawable/ic_sysbar_menu"
android:layout_marginRight="2dp" android:layout_marginEnd="2dp"
systemui:keyCode="82" systemui:keyCode="82"
android:layout_weight="0" android:layout_weight="0"
android:visibility="invisible" android:visibility="invisible"
@ -114,7 +114,7 @@
<ImageView <ImageView
android:layout_width="128dp" android:paddingLeft="25dp" android:paddingRight="25dp" android:layout_width="128dp" android:paddingLeft="25dp" android:paddingRight="25dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="40dp" android:layout_marginStart="40dp"
android:src="@drawable/ic_sysbar_lights_out_dot_small" android:src="@drawable/ic_sysbar_lights_out_dot_small"
android:scaleType="center" android:scaleType="center"
android:layout_weight="0" android:layout_weight="0"
@ -128,7 +128,7 @@
/> />
<ImageView <ImageView
android:layout_width="128dp" android:paddingLeft="25dp" android:paddingRight="25dp" android:layout_width="128dp" android:paddingLeft="25dp" android:paddingRight="25dp"
android:layout_marginRight="40dp" android:layout_marginEnd="40dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:src="@drawable/ic_sysbar_lights_out_dot_small" android:src="@drawable/ic_sysbar_lights_out_dot_small"
android:scaleType="center" android:scaleType="center"
@ -186,7 +186,7 @@
android:layout_width="48dp" android:layout_width="48dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="0" android:layout_weight="0"
android:layout_marginLeft="2dp" android:layout_marginStart="2dp"
android:visibility="invisible" android:visibility="invisible"
/> />
<Space <Space
@ -229,7 +229,7 @@
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/menu" <com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/menu"
android:layout_width="48dp" android:layout_width="48dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginRight="2dp" android:layout_marginEnd="2dp"
android:src="@drawable/ic_sysbar_menu" android:src="@drawable/ic_sysbar_menu"
systemui:keyCode="82" systemui:keyCode="82"
android:layout_weight="0" android:layout_weight="0"
@ -255,7 +255,7 @@
<ImageView <ImageView
android:layout_width="162dp" android:paddingLeft="42dp" android:paddingRight="42dp" android:layout_width="162dp" android:paddingLeft="42dp" android:paddingRight="42dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="40dp" android:layout_marginStart="40dp"
android:src="@drawable/ic_sysbar_lights_out_dot_small" android:src="@drawable/ic_sysbar_lights_out_dot_small"
android:scaleType="center" android:scaleType="center"
android:layout_weight="0" android:layout_weight="0"
@ -269,7 +269,7 @@
/> />
<ImageView <ImageView
android:layout_width="162dp" android:paddingLeft="42dp" android:paddingRight="42dp" android:layout_width="162dp" android:paddingLeft="42dp" android:paddingRight="42dp"
android:layout_marginRight="40dp" android:layout_marginEnd="40dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:src="@drawable/ic_sysbar_lights_out_dot_small" android:src="@drawable/ic_sysbar_lights_out_dot_small"
android:scaleType="center" android:scaleType="center"

View File

@ -41,12 +41,12 @@
<include layout="@layout/status_bar_expanded" <include layout="@layout/status_bar_expanded"
android:layout_width="@dimen/notification_panel_width" android:layout_width="@dimen/notification_panel_width"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="left|top" android:layout_gravity="start|top"
/> />
<include layout="@layout/quick_settings" <include layout="@layout/quick_settings"
android:layout_width="@dimen/notification_panel_width" android:layout_width="@dimen/notification_panel_width"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="right|top" android:layout_gravity="end|top"
/> />
</com.android.systemui.statusbar.phone.PanelHolder> </com.android.systemui.statusbar.phone.PanelHolder>
</com.android.systemui.statusbar.phone.StatusBarWindowView> </com.android.systemui.statusbar.phone.StatusBarWindowView>

View File

@ -30,7 +30,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="18sp" android:textSize="18sp"
android:textColor="#ffffffff" android:textColor="#ffffffff"
android:gravity="left" android:gravity="start"
android:text="@string/battery_low_subtitle" android:text="@string/battery_low_subtitle"
/> />
@ -39,7 +39,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="18sp" android:textSize="18sp"
android:textColor="#ffffffff" android:textColor="#ffffffff"
android:gravity="left" android:gravity="start"
android:paddingBottom="16dp" android:paddingBottom="16dp"
/> />

View File

@ -27,9 +27,9 @@
android:id="@+id/header" android:id="@+id/header"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="80dp" android:layout_marginStart="80dp"
android:layout_marginTop="80dp" android:layout_marginTop="80dp"
android:layout_marginRight="80dp" android:layout_marginEnd="80dp"
android:textSize="60sp" android:textSize="60sp"
android:maxLines="1" android:maxLines="1"
android:shadowRadius="8" android:shadowRadius="8"
@ -51,7 +51,7 @@
android:layout_height="190dp" android:layout_height="190dp"
android:background="@drawable/compat_mode_help_divider_bottom" android:background="@drawable/compat_mode_help_divider_bottom"
android:layout_marginBottom="55dp" android:layout_marginBottom="55dp"
android:layout_marginRight="80dp" android:layout_marginEnd="80dp"
android:layout_alignLeft="@id/header" android:layout_alignLeft="@id/header"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
> >
@ -59,7 +59,7 @@
android:id="@+id/icon" android:id="@+id/icon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentEnd="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:src="@drawable/compat_mode_help_icon" android:src="@drawable/compat_mode_help_icon"
android:contentDescription="@string/accessibility_compatibility_zoom_button" android:contentDescription="@string/accessibility_compatibility_zoom_button"
@ -69,9 +69,9 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_alignParentLeft="true" android:layout_alignParentStart="true"
android:layout_toLeftOf="@id/icon" android:layout_toStartOf="@id/icon"
android:layout_marginRight="10dp" android:layout_marginEnd="10dp"
android:shadowRadius="4" android:shadowRadius="4"
android:shadowColor="#FF000000" android:shadowColor="#FF000000"
android:textSize="28sp" android:textSize="28sp"

View File

@ -111,7 +111,7 @@
<ImageView <ImageView
android:layout_width="80dp" android:layout_width="80dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="40dp" android:layout_marginStart="40dp"
android:src="@drawable/ic_sysbar_lights_out_dot_small" android:src="@drawable/ic_sysbar_lights_out_dot_small"
android:scaleType="center" android:scaleType="center"
android:layout_weight="0" android:layout_weight="0"
@ -137,7 +137,7 @@
/> />
<ImageView <ImageView
android:layout_width="80dp" android:layout_width="80dp"
android:layout_marginRight="40dp" android:layout_marginEnd="40dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:src="@drawable/ic_sysbar_lights_out_dot_small" android:src="@drawable/ic_sysbar_lights_out_dot_small"
android:scaleType="center" android:scaleType="center"

View File

@ -28,13 +28,13 @@
android:id="@+id/wifi_combo" android:id="@+id/wifi_combo"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_marginRight="-6dp" android:layout_marginEnd="-6dp"
> >
<ImageView <ImageView
android:id="@+id/wifi_signal" android:id="@+id/wifi_signal"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentEnd="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:scaleType="center" android:scaleType="center"
/> />
@ -55,13 +55,13 @@
android:id="@+id/wimax_combo" android:id="@+id/wimax_combo"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_marginRight="-6dp" android:layout_marginEnd="-6dp"
> >
<ImageView <ImageView
android:id="@+id/wimax_signal" android:id="@+id/wimax_signal"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentEnd="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:scaleType="center" android:scaleType="center"
/> />
@ -101,7 +101,7 @@
android:id="@+id/mobile_inout" android:id="@+id/mobile_inout"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_gravity="right|bottom" android:layout_gravity="end|bottom"
/> />
</FrameLayout> </FrameLayout>
</FrameLayout> </FrameLayout>

View File

@ -66,7 +66,7 @@
<com.android.systemui.statusbar.phone.IconMerger android:id="@+id/notificationIcons" <com.android.systemui.statusbar.phone.IconMerger android:id="@+id/notificationIcons"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_alignParentLeft="true" android:layout_alignParentStart="true"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"/> android:orientation="horizontal"/>
</LinearLayout> </LinearLayout>
@ -110,7 +110,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:singleLine="true" android:singleLine="true"
android:paddingLeft="6dip" android:paddingLeft="6dip"
android:gravity="center_vertical|left" android:gravity="center_vertical|start"
/> />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
@ -124,7 +124,7 @@
<ImageSwitcher android:id="@+id/tickerIcon" <ImageSwitcher android:id="@+id/tickerIcon"
android:layout_width="@dimen/status_bar_icon_size" android:layout_width="@dimen/status_bar_icon_size"
android:layout_height="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size"
android:layout_marginRight="4dip" android:layout_marginEnd="4dip"
> >
<com.android.systemui.statusbar.AnimatedImageView <com.android.systemui.statusbar.AnimatedImageView
android:layout_width="@dimen/status_bar_icon_size" android:layout_width="@dimen/status_bar_icon_size"

View File

@ -26,7 +26,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/notification_panel_bg" android:background="@drawable/notification_panel_bg"
android:paddingTop="@dimen/notification_panel_padding_top" android:paddingTop="@dimen/notification_panel_padding_top"
android:layout_marginLeft="@dimen/notification_panel_margin_left" android:layout_marginStart="@dimen/notification_panel_margin_left"
> >
<View <View

View File

@ -39,7 +39,7 @@
android:id="@+id/clock" android:id="@+id/clock"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="8dp" android:layout_marginEnd="8dp"
android:singleLine="true" android:singleLine="true"
android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock" android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock"
android:layout_centerVertical="true" android:layout_centerVertical="true"
@ -50,7 +50,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:singleLine="true" android:singleLine="true"
android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date" android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date"
android:layout_toRightOf="@id/clock" android:layout_toEndOf="@id/clock"
android:layout_alignBaseline="@id/clock" android:layout_alignBaseline="@id/clock"
/> />
</RelativeLayout> </RelativeLayout>
@ -86,7 +86,7 @@
<FrameLayout android:id="@+id/settings_button_holder" <FrameLayout android:id="@+id/settings_button_holder"
android:layout_width="50dp" android:layout_width="50dp"
android:layout_height="50dp" android:layout_height="50dp"
android:layout_marginLeft="12dp" android:layout_marginStart="12dp"
> >
<ImageView android:id="@+id/settings_button" <ImageView android:id="@+id/settings_button"
android:layout_width="50dp" android:layout_width="50dp"

View File

@ -27,7 +27,7 @@
android:background="#DD000000" android:background="#DD000000"
android:focusable="true" android:focusable="true"
android:orientation="vertical" android:orientation="vertical"
android:gravity="top|left" android:gravity="top|start"
> >
<ImageView <ImageView

View File

@ -33,8 +33,8 @@
<TextView android:id="@+id/number" <TextView android:id="@+id/number"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="right|bottom" android:layout_gravity="end|bottom"
android:layout_marginRight="1dp" android:layout_marginEnd="1dp"
android:layout_marginBottom="1dp" android:layout_marginBottom="1dp"
android:textSize="10sp" android:textSize="10sp"
android:textColor="#ffffffff" android:textColor="#ffffffff"

View File

@ -17,8 +17,8 @@
android:id="@+id/veto" android:id="@+id/veto"
android:layout_width="48dp" android:layout_width="48dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="right" android:gravity="end"
android:layout_marginRight="-80dp" android:layout_marginEnd="-80dp"
android:background="@null" android:background="@null"
android:paddingRight="8dp" android:paddingRight="8dp"
android:paddingLeft="8dp" android:paddingLeft="8dp"
@ -54,7 +54,7 @@
android:visibility="invisible" android:visibility="invisible"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom|right" android:layout_gravity="bottom|end"
android:fontFamily="sans-serif-condensed" android:fontFamily="sans-serif-condensed"
android:textSize="9dp" android:textSize="9dp"
android:textStyle="bold" android:textStyle="bold"

View File

@ -40,10 +40,10 @@
android:fadingEdge="horizontal" android:fadingEdge="horizontal"
android:fadingEdgeLength="@dimen/status_bar_recents_text_fading_edge_length" android:fadingEdgeLength="@dimen/status_bar_recents_text_fading_edge_length"
android:scrollHorizontally="true" android:scrollHorizontally="true"
android:layout_alignParentLeft="true" android:layout_alignParentStart="true"
android:layout_alignTop="@+id/app_icon" android:layout_alignTop="@+id/app_icon"
android:paddingTop="2dp" android:paddingTop="2dp"
android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin" android:layout_marginStart="@dimen/status_bar_recents_app_label_left_margin"
android:singleLine="true" android:singleLine="true"
android:ellipsize="marquee" android:ellipsize="marquee"
android:textColor="@color/status_bar_recents_app_label_color" android:textColor="@color/status_bar_recents_app_label_color"
@ -53,8 +53,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:layout_toRightOf="@id/app_label" android:layout_toEndOf="@id/app_label"
android:layout_marginLeft="@dimen/status_bar_recents_thumbnail_left_margin" android:layout_marginStart="@dimen/status_bar_recents_thumbnail_left_margin"
android:background="@drawable/recents_thumbnail_bg" android:background="@drawable/recents_thumbnail_bg"
android:foreground="@drawable/recents_thumbnail_fg" android:foreground="@drawable/recents_thumbnail_fg"
android:visibility="invisible"> android:visibility="invisible">
@ -66,11 +66,11 @@
<View android:id="@+id/recents_callout_line" <View android:id="@+id/recents_callout_line"
android:layout_width="@dimen/status_bar_recents_app_label_width" android:layout_width="@dimen/status_bar_recents_app_label_width"
android:layout_height="1dip" android:layout_height="1dip"
android:layout_alignParentLeft="true" android:layout_alignParentStart="true"
android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin" android:layout_marginStart="@dimen/status_bar_recents_app_label_left_margin"
android:layout_toLeftOf="@id/app_thumbnail" android:layout_toStartOf="@id/app_thumbnail"
android:layout_below="@id/app_label" android:layout_below="@id/app_label"
android:layout_marginRight="3dip" android:layout_marginEnd="3dip"
android:layout_marginTop="3dip" android:layout_marginTop="3dip"
android:background="@drawable/recents_callout_line" android:background="@drawable/recents_callout_line"
/> />
@ -78,8 +78,8 @@
<ImageView android:id="@id/app_icon" <ImageView android:id="@id/app_icon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_toRightOf="@id/app_label" android:layout_toEndOf="@id/app_label"
android:layout_marginLeft="@dimen/status_bar_recents_app_icon_left_margin" android:layout_marginStart="@dimen/status_bar_recents_app_icon_left_margin"
android:layout_marginTop="@dimen/status_bar_recents_app_icon_top_margin" android:layout_marginTop="@dimen/status_bar_recents_app_icon_top_margin"
android:maxWidth="@dimen/status_bar_recents_app_icon_max_width" android:maxWidth="@dimen/status_bar_recents_app_icon_max_width"
android:maxHeight="@dimen/status_bar_recents_app_icon_max_height" android:maxHeight="@dimen/status_bar_recents_app_icon_max_height"
@ -95,8 +95,8 @@
android:fadingEdge="horizontal" android:fadingEdge="horizontal"
android:fadingEdgeLength="@dimen/status_bar_recents_text_fading_edge_length" android:fadingEdgeLength="@dimen/status_bar_recents_text_fading_edge_length"
android:scrollHorizontally="true" android:scrollHorizontally="true"
android:layout_alignParentLeft="true" android:layout_alignParentStart="true"
android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin" android:layout_marginStart="@dimen/status_bar_recents_app_label_left_margin"
android:layout_below="@id/recents_callout_line" android:layout_below="@id/recents_callout_line"
android:layout_marginTop="3dip" android:layout_marginTop="3dip"
android:singleLine="true" android:singleLine="true"

View File

@ -37,13 +37,13 @@
android:id="@+id/recents_container" android:id="@+id/recents_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="0dp" android:layout_marginEnd="0dp"
android:divider="@null" android:divider="@null"
android:stackFromBottom="true" android:stackFromBottom="true"
android:fadingEdge="vertical" android:fadingEdge="vertical"
android:scrollbars="none" android:scrollbars="none"
android:fadingEdgeLength="@dimen/status_bar_recents_scroll_fading_edge_length" android:fadingEdgeLength="@dimen/status_bar_recents_scroll_fading_edge_length"
android:layout_gravity="bottom|left" android:layout_gravity="bottom|start"
android:clipToPadding="false" android:clipToPadding="false"
android:clipChildren="false"> android:clipChildren="false">

View File

@ -24,7 +24,7 @@
android:id="@+id/toggle" android:id="@+id/toggle"
android:layout_width="48dp" android:layout_width="48dp"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_alignParentLeft="true" android:layout_alignParentStart="true"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:button="@null" android:button="@null"
@ -33,9 +33,9 @@
android:id="@+id/slider" android:id="@+id/slider"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_toRightOf="@id/toggle" android:layout_toEndOf="@id/toggle"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_alignParentRight="true" android:layout_alignParentEnd="true"
android:paddingLeft="20dp" android:paddingLeft="20dp"
android:paddingRight="20dp" android:paddingRight="20dp"
/> />

View File

@ -39,7 +39,7 @@
<include layout="@layout/system_bar_notification_area" <include layout="@layout/system_bar_notification_area"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_alignParentRight="true" android:layout_alignParentEnd="true"
android:layout_marginTop="1dp" android:layout_marginTop="1dp"
/> />
@ -48,7 +48,7 @@
android:id="@+id/navigationArea" android:id="@+id/navigationArea"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_alignParentLeft="true" android:layout_alignParentStart="true"
android:orientation="horizontal" android:orientation="horizontal"
android:clipChildren="false" android:clipChildren="false"
android:clipToPadding="false" android:clipToPadding="false"
@ -93,8 +93,8 @@
android:layout_width="0dp" android:layout_width="0dp"
android:paddingLeft="8dip" android:paddingLeft="8dip"
android:paddingRight="8dip" android:paddingRight="8dip"
android:layout_toRightOf="@+id/navigationArea" android:layout_toEndOf="@+id/navigationArea"
android:layout_toLeftOf="@+id/notificationArea" android:layout_toStartOf="@+id/notificationArea"
android:visibility="gone" android:visibility="gone"
/> />
</RelativeLayout> </RelativeLayout>
@ -119,7 +119,7 @@
android:layout_width="80dip" android:layout_width="80dip"
android:layout_height="48dip" android:layout_height="48dip"
android:src="@drawable/ic_sysbar_lights_out_dot_small" android:src="@drawable/ic_sysbar_lights_out_dot_small"
android:layout_alignParentLeft="true" android:layout_alignParentStart="true"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
/> />
<ImageView <ImageView
@ -127,7 +127,7 @@
android:layout_width="80dip" android:layout_width="80dip"
android:layout_height="48dip" android:layout_height="48dip"
android:src="@drawable/ic_sysbar_lights_out_dot_large" android:src="@drawable/ic_sysbar_lights_out_dot_large"
android:layout_toRightOf="@+id/dot0" android:layout_toEndOf="@+id/dot0"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
/> />
<ImageView <ImageView
@ -135,7 +135,7 @@
android:layout_width="80dip" android:layout_width="80dip"
android:layout_height="48dip" android:layout_height="48dip"
android:src="@drawable/ic_sysbar_lights_out_dot_small" android:src="@drawable/ic_sysbar_lights_out_dot_small"
android:layout_toRightOf="@+id/dot1" android:layout_toEndOf="@+id/dot1"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
/> />
<ImageView <ImageView
@ -143,7 +143,7 @@
android:layout_width="80dip" android:layout_width="80dip"
android:layout_height="48dip" android:layout_height="48dip"
android:src="@drawable/ic_sysbar_lights_out_dot_small" android:src="@drawable/ic_sysbar_lights_out_dot_small"
android:layout_alignParentRight="true" android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
/> />
</RelativeLayout> </RelativeLayout>

View File

@ -71,7 +71,7 @@
<TextView <TextView
android:id="@+id/item_subtitle" android:id="@+id/item_subtitle"
android:layout_marginTop="-4dip" android:layout_marginTop="-4dip"
android:layout_gravity="center_vertical|left" android:layout_gravity="center_vertical|start"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:textAppearance="?android:attr/textAppearanceSmall" />
@ -87,7 +87,7 @@
android:id="@+id/item_settings_icon" android:id="@+id/item_settings_icon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="5dip" android:layout_marginStart="5dip"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:paddingRight="10dip" android:paddingRight="10dip"
android:paddingLeft="10dip" android:paddingLeft="10dip"

View File

@ -36,7 +36,7 @@
<LinearLayout <LinearLayout
android:layout_width="450dip" android:layout_width="450dip"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="20dip" android:layout_marginStart="20dip"
android:orientation="vertical" android:orientation="vertical"
android:background="@drawable/notify_panel_clock_bg"> android:background="@drawable/notify_panel_clock_bg">
<!-- Hard keyboard switch --> <!-- Hard keyboard switch -->
@ -71,7 +71,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginRight="16dip" /> android:layout_marginEnd="16dip" />
</LinearLayout> </LinearLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@ -30,7 +30,7 @@
android:textSize="20dp" android:textSize="20dp"
android:textColor="@android:color/holo_blue_light" android:textColor="@android:color/holo_blue_light"
android:text="@string/status_bar_no_recent_apps" android:text="@string/status_bar_no_recent_apps"
android:gravity="left" android:gravity="start"
android:layout_gravity="bottom|left" android:layout_gravity="bottom|start"
/> />
</FrameLayout> </FrameLayout>

View File

@ -22,7 +22,7 @@
android:id="@+id/notificationArea" android:id="@+id/notificationArea"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_alignParentRight="true" android:layout_alignParentEnd="true"
android:orientation="horizontal" android:orientation="horizontal"
android:background="?android:attr/listChoiceBackgroundIndicator" android:background="?android:attr/listChoiceBackgroundIndicator"
android:clickable="true" android:clickable="true"
@ -39,7 +39,7 @@
android:id="@+id/imeSwitchButton" android:id="@+id/imeSwitchButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="8dip" android:layout_marginStart="8dip"
android:src="@drawable/ic_sysbar_ime_default" android:src="@drawable/ic_sysbar_ime_default"
android:visibility="gone" android:visibility="gone"
android:contentDescription="@string/accessibility_ime_switch_button" android:contentDescription="@string/accessibility_ime_switch_button"
@ -49,7 +49,7 @@
android:id="@+id/compatModeButton" android:id="@+id/compatModeButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="8dip" android:layout_marginStart="8dip"
android:src="@drawable/ic_sysbar_zoom" android:src="@drawable/ic_sysbar_zoom"
android:visibility="gone" android:visibility="gone"
android:contentDescription="@string/accessibility_compatibility_zoom_button" android:contentDescription="@string/accessibility_compatibility_zoom_button"
@ -66,7 +66,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginLeft="8dp" android:layout_marginStart="8dp"
android:alpha="0.4" android:alpha="0.4"
/> />
</com.android.systemui.statusbar.tablet.NotificationIconArea> </com.android.systemui.statusbar.tablet.NotificationIconArea>
@ -85,16 +85,16 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:singleLine="true" android:singleLine="true"
android:paddingLeft="6dip" android:paddingLeft="6dip"
android:layout_marginRight="8dip" android:layout_marginEnd="8dip"
android:gravity="center_vertical|left" android:gravity="center_vertical|start"
/> />
<TextView <TextView
android:id="@+id/network_text" android:id="@+id/network_text"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginRight="6dip" android:layout_marginEnd="6dip"
android:layout_marginLeft="6dip" android:layout_marginStart="6dip"
android:gravity="center" android:gravity="center"
android:singleLine="true" android:singleLine="true"
android:visibility="gone" android:visibility="gone"
@ -106,7 +106,7 @@
android:id="@+id/signal_battery_cluster" android:id="@+id/signal_battery_cluster"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginRight="16dp" android:layout_marginEnd="16dp"
android:orientation="horizontal" android:orientation="horizontal"
android:gravity="center" android:gravity="center"
> >

View File

@ -21,7 +21,7 @@
android:id="@+id/content_parent" android:id="@+id/content_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_width="match_parent" android:layout_width="match_parent"
android:gravity="right" android:gravity="end"
> >
<!-- lift the panel up off the status bar while leaving a touchable are --> <!-- lift the panel up off the status bar while leaving a touchable are -->
@ -29,7 +29,7 @@
android:id="@+id/system_bar_notification_panel_bottom_space" android:id="@+id/system_bar_notification_panel_bottom_space"
android:layout_height="56dp" android:layout_height="56dp"
android:layout_width="478dp" android:layout_width="478dp"
android:layout_alignParentRight="true" android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
/> />
@ -39,7 +39,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="478dp" android:layout_width="478dp"
android:orientation="vertical" android:orientation="vertical"
android:layout_alignParentRight="true" android:layout_alignParentEnd="true"
android:layout_above="@id/system_bar_notification_panel_bottom_space" android:layout_above="@id/system_bar_notification_panel_bottom_space"
android:paddingBottom="8dp" android:paddingBottom="8dp"
> >
@ -48,7 +48,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="130dp" android:layout_height="130dp"
android:layout_above="@id/content_frame" android:layout_above="@id/content_frame"
android:layout_alignParentRight="true" android:layout_alignParentEnd="true"
android:layout_weight="0" android:layout_weight="0"
/> />

View File

@ -32,7 +32,7 @@
android:id="@+id/icons" android:id="@+id/icons"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:layout_alignParentStart="true"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_marginBottom="16dp" android:layout_marginBottom="16dp"
@ -86,7 +86,7 @@
<TextView <TextView
android:id="@+id/mobile_text" android:id="@+id/mobile_text"
style="@style/SystemBarNotificationText" style="@style/SystemBarNotificationText"
android:layout_gravity="left|center_vertical" android:layout_gravity="start|center_vertical"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingRight="12dp" android:paddingRight="12dp"
@ -122,7 +122,7 @@
<TextView <TextView
android:id="@+id/wifi_text" android:id="@+id/wifi_text"
style="@style/SystemBarNotificationText" style="@style/SystemBarNotificationText"
android:layout_gravity="left|center_vertical" android:layout_gravity="start|center_vertical"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingRight="12dp" android:paddingRight="12dp"
@ -147,7 +147,7 @@
style="@style/SystemBarNotificationText" style="@style/SystemBarNotificationText"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="left|center_vertical" android:layout_gravity="start|center_vertical"
android:paddingRight="2dp" android:paddingRight="2dp"
android:singleLine="true" android:singleLine="true"
android:text="@string/status_bar_settings_settings_button" android:text="@string/status_bar_settings_settings_button"
@ -209,8 +209,8 @@
android:id="@+id/date" android:id="@+id/date"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="8dp" android:layout_marginStart="8dp"
android:layout_marginRight="8dp" android:layout_marginEnd="8dp"
android:textAppearance="@style/TextAppearance.SystemBar.Expanded.Date" android:textAppearance="@style/TextAppearance.SystemBar.Expanded.Date"
/> />

View File

@ -30,9 +30,9 @@
android:fadingEdge="horizontal" android:fadingEdge="horizontal"
android:fadingEdgeLength="@dimen/status_bar_recents_text_fading_edge_length" android:fadingEdgeLength="@dimen/status_bar_recents_text_fading_edge_length"
android:scrollHorizontally="true" android:scrollHorizontally="true"
android:layout_alignParentLeft="true" android:layout_alignParentStart="true"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin" android:layout_marginStart="@dimen/status_bar_recents_app_label_left_margin"
android:layout_marginTop="32dip" android:layout_marginTop="32dip"
android:singleLine="true" android:singleLine="true"
android:ellipsize="marquee" android:ellipsize="marquee"
@ -43,8 +43,8 @@
<FrameLayout android:id="@+id/app_thumbnail" <FrameLayout android:id="@+id/app_thumbnail"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_toRightOf="@id/app_label" android:layout_toEndOf="@id/app_label"
android:layout_marginLeft="@dimen/status_bar_recents_thumbnail_left_margin" android:layout_marginStart="@dimen/status_bar_recents_thumbnail_left_margin"
android:scaleType="center" android:scaleType="center"
android:background="@drawable/recents_thumbnail_bg" android:background="@drawable/recents_thumbnail_bg"
android:foreground="@drawable/recents_thumbnail_fg" android:foreground="@drawable/recents_thumbnail_fg"
@ -59,8 +59,8 @@
<ImageView android:id="@+id/app_icon" <ImageView android:id="@+id/app_icon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_toRightOf="@id/app_label" android:layout_toEndOf="@id/app_label"
android:layout_marginLeft="@dimen/status_bar_recents_app_icon_left_margin" android:layout_marginStart="@dimen/status_bar_recents_app_icon_left_margin"
android:layout_marginTop="@dimen/status_bar_recents_app_icon_top_margin" android:layout_marginTop="@dimen/status_bar_recents_app_icon_top_margin"
android:maxWidth="@dimen/status_bar_recents_app_icon_max_width" android:maxWidth="@dimen/status_bar_recents_app_icon_max_width"
android:maxHeight="@dimen/status_bar_recents_app_icon_max_height" android:maxHeight="@dimen/status_bar_recents_app_icon_max_height"
@ -75,10 +75,10 @@
android:layout_height="1dip" android:layout_height="1dip"
android:layout_below="@id/app_label" android:layout_below="@id/app_label"
android:layout_marginTop="3dip" android:layout_marginTop="3dip"
android:layout_alignParentLeft="true" android:layout_alignParentStart="true"
android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin" android:layout_marginStart="@dimen/status_bar_recents_app_label_left_margin"
android:layout_toLeftOf="@id/app_thumbnail" android:layout_toStartOf="@id/app_thumbnail"
android:layout_marginRight="3dip" android:layout_marginEnd="3dip"
android:background="@drawable/recents_callout_line" android:background="@drawable/recents_callout_line"
/> />
@ -89,9 +89,9 @@
android:fadingEdge="horizontal" android:fadingEdge="horizontal"
android:fadingEdgeLength="@dimen/status_bar_recents_text_fading_edge_length" android:fadingEdgeLength="@dimen/status_bar_recents_text_fading_edge_length"
android:scrollHorizontally="true" android:scrollHorizontally="true"
android:layout_alignParentLeft="true" android:layout_alignParentStart="true"
android:layout_below="@id/recents_callout_line" android:layout_below="@id/recents_callout_line"
android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin" android:layout_marginStart="@dimen/status_bar_recents_app_label_left_margin"
android:layout_marginTop="3dip" android:layout_marginTop="3dip"
android:singleLine="true" android:singleLine="true"
android:ellipsize="marquee" android:ellipsize="marquee"

View File

@ -41,13 +41,13 @@
<com.android.systemui.recent.RecentsVerticalScrollView android:id="@+id/recents_container" <com.android.systemui.recent.RecentsVerticalScrollView android:id="@+id/recents_container"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="@dimen/status_bar_recents_right_glow_margin" android:layout_marginEnd="@dimen/status_bar_recents_right_glow_margin"
android:divider="@null" android:divider="@null"
android:stackFromBottom="true" android:stackFromBottom="true"
android:fadingEdge="vertical" android:fadingEdge="vertical"
android:scrollbars="none" android:scrollbars="none"
android:fadingEdgeLength="20dip" android:fadingEdgeLength="20dip"
android:layout_gravity="bottom|left" android:layout_gravity="bottom|start"
android:clipToPadding="false" android:clipToPadding="false"
android:clipChildren="false"> android:clipChildren="false">
@ -65,7 +65,7 @@
android:id="@+id/recents_no_apps" android:id="@+id/recents_no_apps"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="58dip" android:layout_marginStart="58dip"
android:layout_marginBottom="36dip" android:layout_marginBottom="36dip"
android:visibility="invisible" /> android:visibility="invisible" />
@ -76,7 +76,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@*android:dimen/system_bar_height" android:layout_height="@*android:dimen/system_bar_height"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true" android:layout_alignParentStart="true"
/> />

View File

@ -43,7 +43,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginRight="5dp" android:layout_marginEnd="5dp"
/> />
</LinearLayout> </LinearLayout>
<View style="@style/SystemBarPanelSettingsPanelSeparator" /> <View style="@style/SystemBarPanelSettingsPanelSeparator" />
@ -86,7 +86,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginRight="5dp" android:layout_marginEnd="5dp"
/> />
</LinearLayout> </LinearLayout>
<View <View
@ -105,7 +105,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_weight="1" android:layout_weight="1"
android:layout_marginRight="2dp" android:layout_marginEnd="2dp"
systemui:text="@string/status_bar_settings_auto_brightness_label" systemui:text="@string/status_bar_settings_auto_brightness_label"
/> />
</LinearLayout> </LinearLayout>
@ -130,7 +130,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginRight="5dp" android:layout_marginEnd="5dp"
/> />
</LinearLayout> </LinearLayout>
<View style="@style/SystemBarPanelSettingsPanelSeparator" /> <View style="@style/SystemBarPanelSettingsPanelSeparator" />

View File

@ -50,7 +50,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginLeft="12dp" android:layout_marginStart="12dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:maxLines="2" android:maxLines="2"
/> />

View File

@ -25,7 +25,7 @@
android:layout_height="@*android:dimen/system_bar_height" android:layout_height="@*android:dimen/system_bar_height"
android:layout_width="match_parent" android:layout_width="match_parent"
android:background="@drawable/system_bar_ticker_background" android:background="@drawable/system_bar_ticker_background"
android:layout_alignParentLeft="true" android:layout_alignParentStart="true"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:clickable="false" android:clickable="false"
/> />
@ -36,7 +36,7 @@
android:layout_height="@android:dimen/notification_large_icon_width" android:layout_height="@android:dimen/notification_large_icon_width"
android:scaleType="center" android:scaleType="center"
android:visibility="gone" android:visibility="gone"
android:layout_alignParentLeft="true" android:layout_alignParentStart="true"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
/> />
@ -45,7 +45,7 @@
android:layout_weight="1" android:layout_weight="1"
android:layout_height="@*android:dimen/system_bar_height" android:layout_height="@*android:dimen/system_bar_height"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_toRightOf="@id/large_icon" android:layout_toEndOf="@id/large_icon"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_alignWithParentIfMissing="true" android:layout_alignWithParentIfMissing="true"
/> />

View File

@ -22,7 +22,7 @@
<Button android:id="@+id/close" <Button android:id="@+id/close"
android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentTop="true" android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:layout_alignParentEnd="true"
android:text="@string/close_universe" /> android:text="@string/close_universe" />
<TextView android:id="@+id/title" <TextView android:id="@+id/title"

View File

@ -24,9 +24,9 @@
<dimen name="notification_panel_margin_left">16dp</dimen> <dimen name="notification_panel_margin_left">16dp</dimen>
<!-- Gravity for the notification & quick settings panels --> <!-- Gravity for the notification & quick settings panels -->
<!-- 0x33 = left|top ; 0x35 = right|top --> <!-- 0x800033 = start|top ; 0x800035 = end|top -->
<integer name="notification_panel_layout_gravity">0x33</integer> <integer name="notification_panel_layout_gravity">0x800033</integer>
<integer name="settings_panel_layout_gravity">0x35</integer> <integer name="settings_panel_layout_gravity">0x800035</integer>
<!-- Diameter of outer shape drawable shown in navbar search--> <!-- Diameter of outer shape drawable shown in navbar search-->
<dimen name="navbar_search_outerring_diameter">430dip</dimen> <dimen name="navbar_search_outerring_diameter">430dip</dimen>

View File

@ -39,13 +39,13 @@
<item name="android:layout_height">wrap_content</item> <item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">0dp</item> <item name="android:layout_width">0dp</item>
<item name="android:layout_weight">1</item> <item name="android:layout_weight">1</item>
<item name="android:layout_gravity">left|center_vertical</item> <item name="android:layout_gravity">start|center_vertical</item>
<item name="android:textColor">?android:attr/textColorPrimary</item> <item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:textSize">18sp</item> <item name="android:textSize">18sp</item>
</style> </style>
<style name="SystemBarPanelSettingsPanelSeparator"> <style name="SystemBarPanelSettingsPanelSeparator">
<item name="android:layout_marginRight">0dp</item> <item name="android:layout_marginEnd">0dp</item>
<item name="android:layout_width">match_parent</item> <item name="android:layout_width">match_parent</item>
<item name="android:layout_height">1dp</item> <item name="android:layout_height">1dp</item>
<item name="android:background">@android:drawable/divider_horizontal_dark</item> <item name="android:background">@android:drawable/divider_horizontal_dark</item>

View File

@ -293,7 +293,7 @@ public class LoadAverageService extends Service {
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE| WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE|
WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE, WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE,
PixelFormat.TRANSLUCENT); PixelFormat.TRANSLUCENT);
params.gravity = Gravity.RIGHT | Gravity.TOP; params.gravity = Gravity.END | Gravity.TOP;
params.setTitle("Load Average"); params.setTitle("Load Average");
WindowManager wm = (WindowManager)getSystemService(WINDOW_SERVICE); WindowManager wm = (WindowManager)getSystemService(WINDOW_SERVICE);
wm.addView(mView, params); wm.addView(mView, params);

View File

@ -17,6 +17,7 @@
package com.android.systemui.statusbar; package com.android.systemui.statusbar;
import android.content.res.Configuration;
import com.android.internal.statusbar.IStatusBarService; import com.android.internal.statusbar.IStatusBarService;
import com.android.internal.statusbar.StatusBarIcon; import com.android.internal.statusbar.StatusBarIcon;
import com.android.internal.statusbar.StatusBarIconList; import com.android.internal.statusbar.StatusBarIconList;
@ -44,7 +45,6 @@ import android.content.Intent;
import android.content.IntentFilter; import android.content.IntentFilter;
import android.content.pm.ApplicationInfo; import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager.NameNotFoundException; import android.content.pm.PackageManager.NameNotFoundException;
import android.content.res.Configuration;
import android.content.res.Resources; import android.content.res.Resources;
import android.database.ContentObserver; import android.database.ContentObserver;
import android.graphics.Bitmap; import android.graphics.Bitmap;
@ -80,6 +80,7 @@ import android.widget.RemoteViews;
import android.widget.TextView; import android.widget.TextView;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Locale;
public abstract class BaseStatusBar extends SystemUI implements public abstract class BaseStatusBar extends SystemUI implements
CommandQueue.Callbacks { CommandQueue.Callbacks {
@ -124,6 +125,9 @@ public abstract class BaseStatusBar extends SystemUI implements
protected int mCurrentUserId = 0; protected int mCurrentUserId = 0;
protected int mLayoutDirection;
private Locale mLocale;
// UI-specific methods // UI-specific methods
/** /**
@ -134,6 +138,8 @@ public abstract class BaseStatusBar extends SystemUI implements
protected WindowManager mWindowManager; protected WindowManager mWindowManager;
protected IWindowManager mWindowManagerService; protected IWindowManager mWindowManagerService;
protected abstract void refreshLayout(int layoutDirection);
protected Display mDisplay; protected Display mDisplay;
private boolean mDeviceProvisioned = false; private boolean mDeviceProvisioned = false;
@ -203,6 +209,9 @@ public abstract class BaseStatusBar extends SystemUI implements
mBarService = IStatusBarService.Stub.asInterface( mBarService = IStatusBarService.Stub.asInterface(
ServiceManager.getService(Context.STATUS_BAR_SERVICE)); ServiceManager.getService(Context.STATUS_BAR_SERVICE));
mLocale = mContext.getResources().getConfiguration().locale;
mLayoutDirection = TextUtils.getLayoutDirectionFromLocale(mLocale);
// Connect in to the status bar manager service // Connect in to the status bar manager service
StatusBarIconList iconList = new StatusBarIconList(); StatusBarIconList iconList = new StatusBarIconList();
ArrayList<IBinder> notificationKeys = new ArrayList<IBinder>(); ArrayList<IBinder> notificationKeys = new ArrayList<IBinder>();
@ -274,6 +283,8 @@ public abstract class BaseStatusBar extends SystemUI implements
userSwitched(mCurrentUserId); userSwitched(mCurrentUserId);
} }
}}, filter); }}, filter);
mLocale = mContext.getResources().getConfiguration().locale;
} }
public void userSwitched(int newUserId) { public void userSwitched(int newUserId) {
@ -291,6 +302,16 @@ public abstract class BaseStatusBar extends SystemUI implements
|| thisUserId == notificationUserId; || thisUserId == notificationUserId;
} }
@Override
protected void onConfigurationChanged(Configuration newConfig) {
final Locale newLocale = mContext.getResources().getConfiguration().locale;
if (! newLocale.equals(mLocale)) {
mLocale = newLocale;
mLayoutDirection = TextUtils.getLayoutDirectionFromLocale(mLocale);
refreshLayout(mLayoutDirection);
}
}
protected View updateNotificationVetoButton(View row, StatusBarNotification n) { protected View updateNotificationVetoButton(View row, StatusBarNotification n) {
View vetoButton = row.findViewById(R.id.veto); View vetoButton = row.findViewById(R.id.veto);
if (n.isClearable()) { if (n.isClearable()) {
@ -426,7 +447,6 @@ public abstract class BaseStatusBar extends SystemUI implements
protected abstract WindowManager.LayoutParams getSearchLayoutParams( protected abstract WindowManager.LayoutParams getSearchLayoutParams(
LayoutParams layoutParams); LayoutParams layoutParams);
protected void updateSearchPanel() { protected void updateSearchPanel() {
// Search Panel // Search Panel
boolean visible = false; boolean visible = false;
@ -442,6 +462,7 @@ public abstract class BaseStatusBar extends SystemUI implements
mSearchPanelView.setOnTouchListener( mSearchPanelView.setOnTouchListener(
new TouchOutsideListener(MSG_CLOSE_SEARCH_PANEL, mSearchPanelView)); new TouchOutsideListener(MSG_CLOSE_SEARCH_PANEL, mSearchPanelView));
mSearchPanelView.setVisibility(View.GONE); mSearchPanelView.setVisibility(View.GONE);
mSearchPanelView.setLayoutDirection(mLayoutDirection);
WindowManager.LayoutParams lp = getSearchLayoutParams(mSearchPanelView.getLayoutParams()); WindowManager.LayoutParams lp = getSearchLayoutParams(mSearchPanelView.getLayoutParams());
@ -714,6 +735,7 @@ public abstract class BaseStatusBar extends SystemUI implements
LayoutInflater inflater = (LayoutInflater)mContext.getSystemService( LayoutInflater inflater = (LayoutInflater)mContext.getSystemService(
Context.LAYOUT_INFLATER_SERVICE); Context.LAYOUT_INFLATER_SERVICE);
View row = inflater.inflate(R.layout.status_bar_notification_row, parent, false); View row = inflater.inflate(R.layout.status_bar_notification_row, parent, false);
row.setLayoutDirection(mLayoutDirection);
// for blaming (see SwipeHelper.setLongPressListener) // for blaming (see SwipeHelper.setLongPressListener)
row.setTag(sbn.pkg); row.setTag(sbn.pkg);
@ -761,6 +783,7 @@ public abstract class BaseStatusBar extends SystemUI implements
params.minHeight = minHeight; params.minHeight = minHeight;
params.maxHeight = minHeight; params.maxHeight = minHeight;
adaptive.addView(expandedOneU, params); adaptive.addView(expandedOneU, params);
expandedOneU.setLayoutDirection(mLayoutDirection);
} }
if (expandedLarge != null) { if (expandedLarge != null) {
SizeAdaptiveLayout.LayoutParams params = SizeAdaptiveLayout.LayoutParams params =
@ -768,6 +791,7 @@ public abstract class BaseStatusBar extends SystemUI implements
params.minHeight = minHeight+1; params.minHeight = minHeight+1;
params.maxHeight = maxHeight; params.maxHeight = maxHeight;
adaptive.addView(expandedLarge, params); adaptive.addView(expandedLarge, params);
expandedLarge.setLayoutDirection(mLayoutDirection);
} }
row.setDrawingCacheEnabled(true); row.setDrawingCacheEnabled(true);

View File

@ -172,8 +172,9 @@ public class SignalClusterView
} }
if (mIsAirplaneMode) { if (mIsAirplaneMode) {
mAirplane.setVisibility(View.VISIBLE); mAirplane.setImageDrawable(null);
mAirplane.setImageResource(mAirplaneIconId); mAirplane.setImageResource(mAirplaneIconId);
mAirplane.setVisibility(View.VISIBLE);
} else { } else {
mAirplane.setVisibility(View.GONE); mAirplane.setVisibility(View.GONE);
} }

View File

@ -74,6 +74,7 @@ public class NavigationBarView extends LinearLayout {
int mNavigationIconHints = 0; int mNavigationIconHints = 0;
private Drawable mBackIcon, mBackLandIcon, mBackAltIcon, mBackAltLandIcon; private Drawable mBackIcon, mBackLandIcon, mBackAltIcon, mBackAltLandIcon;
private Drawable mRecentIcon;
private DelegateViewHelper mDelegateHelper; private DelegateViewHelper mDelegateHelper;
private DeadZone mDeadZone; private DeadZone mDeadZone;
@ -169,10 +170,22 @@ public class NavigationBarView extends LinearLayout {
mShowMenu = false; mShowMenu = false;
mDelegateHelper = new DelegateViewHelper(this); mDelegateHelper = new DelegateViewHelper(this);
getIcons(res);
}
private void getIcons(Resources res) {
mBackIcon = res.getDrawable(R.drawable.ic_sysbar_back); mBackIcon = res.getDrawable(R.drawable.ic_sysbar_back);
mBackLandIcon = res.getDrawable(R.drawable.ic_sysbar_back_land); mBackLandIcon = res.getDrawable(R.drawable.ic_sysbar_back_land);
mBackAltIcon = res.getDrawable(R.drawable.ic_sysbar_back_ime); mBackAltIcon = res.getDrawable(R.drawable.ic_sysbar_back_ime);
mBackAltLandIcon = res.getDrawable(R.drawable.ic_sysbar_back_ime); mBackAltLandIcon = res.getDrawable(R.drawable.ic_sysbar_back_ime);
mRecentIcon = res.getDrawable(R.drawable.ic_sysbar_recent);
}
@Override
public void setLayoutDirection(int layoutDirection) {
getIcons(mContext.getResources());
super.setLayoutDirection(layoutDirection);
} }
public void notifyScreenOn(boolean screenOn) { public void notifyScreenOn(boolean screenOn) {
@ -225,6 +238,8 @@ public class NavigationBarView extends LinearLayout {
? (mVertical ? mBackAltLandIcon : mBackAltIcon) ? (mVertical ? mBackAltLandIcon : mBackAltIcon)
: (mVertical ? mBackLandIcon : mBackIcon)); : (mVertical ? mBackLandIcon : mBackIcon));
((ImageView)getRecentsButton()).setImageDrawable(mRecentIcon);
setDisabledFlags(mDisabledFlags, true); setDisabledFlags(mDisabledFlags, true);
} }

View File

@ -356,6 +356,7 @@ public class PhoneStatusBar extends BaseStatusBar {
} }
return mStatusBarWindow.onTouchEvent(event); return mStatusBarWindow.onTouchEvent(event);
}}); }});
mStatusBarWindow.setLayoutDirection(mLayoutDirection);
mStatusBarView = (PhoneStatusBarView) mStatusBarWindow.findViewById(R.id.status_bar); mStatusBarView = (PhoneStatusBarView) mStatusBarWindow.findViewById(R.id.status_bar);
mStatusBarView.setBar(this); mStatusBarView.setBar(this);
@ -387,6 +388,7 @@ public class PhoneStatusBar extends BaseStatusBar {
mIntruderAlertView = (IntruderAlertView) View.inflate(context, R.layout.intruder_alert, null); mIntruderAlertView = (IntruderAlertView) View.inflate(context, R.layout.intruder_alert, null);
mIntruderAlertView.setVisibility(View.GONE); mIntruderAlertView.setVisibility(View.GONE);
mIntruderAlertView.setBar(this); mIntruderAlertView.setBar(this);
mIntruderAlertView.setLayoutDirection(mLayoutDirection);
} }
if (MULTIUSER_DEBUG) { if (MULTIUSER_DEBUG) {
mNotificationPanelDebugText = (TextView) mNotificationPanel.findViewById(R.id.header_debug_info); mNotificationPanelDebugText = (TextView) mNotificationPanel.findViewById(R.id.header_debug_info);
@ -404,6 +406,7 @@ public class PhoneStatusBar extends BaseStatusBar {
mNavigationBarView.setDisabledFlags(mDisabled); mNavigationBarView.setDisabledFlags(mDisabled);
mNavigationBarView.setBar(this); mNavigationBarView.setBar(this);
mNavigationBarView.setLayoutDirection(mLayoutDirection);
} }
} catch (RemoteException ex) { } catch (RemoteException ex) {
// no window manager? good luck with that // no window manager? good luck with that
@ -639,7 +642,7 @@ public class PhoneStatusBar extends BaseStatusBar {
lp.flags |= WindowManager.LayoutParams.FLAG_DIM_BEHIND; lp.flags |= WindowManager.LayoutParams.FLAG_DIM_BEHIND;
lp.dimAmount = 0.75f; lp.dimAmount = 0.75f;
} }
lp.gravity = Gravity.BOTTOM | Gravity.LEFT; lp.gravity = Gravity.BOTTOM | Gravity.START;
lp.setTitle("RecentsPanel"); lp.setTitle("RecentsPanel");
lp.windowAnimations = com.android.internal.R.style.Animation_RecentApplications; lp.windowAnimations = com.android.internal.R.style.Animation_RecentApplications;
lp.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_STATE_UNCHANGED lp.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_STATE_UNCHANGED
@ -661,7 +664,7 @@ public class PhoneStatusBar extends BaseStatusBar {
if (ActivityManager.isHighEndGfx()) { if (ActivityManager.isHighEndGfx()) {
lp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED; lp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
} }
lp.gravity = Gravity.BOTTOM | Gravity.LEFT; lp.gravity = Gravity.BOTTOM | Gravity.START;
lp.setTitle("SearchPanel"); lp.setTitle("SearchPanel");
// TODO: Define custom animation for Search panel // TODO: Define custom animation for Search panel
lp.windowAnimations = com.android.internal.R.style.Animation_RecentApplications; lp.windowAnimations = com.android.internal.R.style.Animation_RecentApplications;
@ -951,6 +954,36 @@ public class PhoneStatusBar extends BaseStatusBar {
setAreThereNotifications(); setAreThereNotifications();
} }
@Override
protected void refreshLayout(int layoutDirection) {
mStatusBarWindow.setLayoutDirection(layoutDirection);
if (ENABLE_INTRUDERS) {
mIntruderAlertView.setLayoutDirection(layoutDirection);
}
if (mNavigationBarView != null) {
mNavigationBarView.setLayoutDirection(layoutDirection);
}
if (mClearButton != null && mClearButton instanceof ImageView) {
// Force asset reloading
((ImageView)mClearButton).setImageDrawable(null);
((ImageView)mClearButton).setImageResource(R.drawable.ic_notify_clear);
}
if (mSettingsButton != null) {
// Force asset reloading
mSettingsButton.setImageDrawable(null);
mSettingsButton.setImageResource(R.drawable.ic_notify_quicksettings);
}
if (mNotificationButton != null) {
// Force asset reloading
mNotificationButton.setImageDrawable(null);
mNotificationButton.setImageResource(R.drawable.ic_notifications);
}
}
private void updateShowSearchHoldoff() { private void updateShowSearchHoldoff() {
mShowSearchHoldoff = mContext.getResources().getInteger( mShowSearchHoldoff = mContext.getResources().getInteger(
R.integer.config_show_search_delay); R.integer.config_show_search_delay);
@ -988,6 +1021,7 @@ public class PhoneStatusBar extends BaseStatusBar {
View v = toShow.get(i); View v = toShow.get(i);
if (v.getParent() == null) { if (v.getParent() == null) {
mPile.addView(v, i); mPile.addView(v, i);
v.setLayoutDirection(mLayoutDirection);
} }
} }
@ -2121,13 +2155,13 @@ public class PhoneStatusBar extends BaseStatusBar {
FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) mNotificationPanel.getLayoutParams(); FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) mNotificationPanel.getLayoutParams();
lp.gravity = mNotificationPanelGravity; lp.gravity = mNotificationPanelGravity;
lp.leftMargin = mNotificationPanelMarginPx; lp.setMarginStart(mNotificationPanelMarginPx);
mNotificationPanel.setLayoutParams(lp); mNotificationPanel.setLayoutParams(lp);
if (mSettingsPanel != null) { if (mSettingsPanel != null) {
lp = (FrameLayout.LayoutParams) mSettingsPanel.getLayoutParams(); lp = (FrameLayout.LayoutParams) mSettingsPanel.getLayoutParams();
lp.gravity = mSettingsPanelGravity; lp.gravity = mSettingsPanelGravity;
lp.rightMargin = mNotificationPanelMarginPx; lp.setMarginEnd(mNotificationPanelMarginPx);
mSettingsPanel.setLayoutParams(lp); mSettingsPanel.setLayoutParams(lp);
} }
@ -2192,7 +2226,8 @@ public class PhoneStatusBar extends BaseStatusBar {
View sampleView = snapshot.get(0); View sampleView = snapshot.get(0);
int width = sampleView.getWidth(); int width = sampleView.getWidth();
final int velocity = width * 8; // 1000/8 = 125 ms duration final int dir = sampleView.isLayoutRtl() ? -1 : +1;
final int velocity = dir * width * 8; // 1000/8 = 125 ms duration
for (final View _v : snapshot) { for (final View _v : snapshot) {
mHandler.postDelayed(new Runnable() { mHandler.postDelayed(new Runnable() {
@Override @Override
@ -2394,11 +2429,12 @@ public class PhoneStatusBar extends BaseStatusBar {
= (int) res.getDimension(R.dimen.notification_panel_margin_left); = (int) res.getDimension(R.dimen.notification_panel_margin_left);
mNotificationPanelGravity = res.getInteger(R.integer.notification_panel_layout_gravity); mNotificationPanelGravity = res.getInteger(R.integer.notification_panel_layout_gravity);
if (mNotificationPanelGravity <= 0) { if (mNotificationPanelGravity <= 0) {
mNotificationPanelGravity = Gravity.LEFT | Gravity.TOP; mNotificationPanelGravity = Gravity.START | Gravity.TOP;
} }
mSettingsPanelGravity = res.getInteger(R.integer.settings_panel_layout_gravity); mSettingsPanelGravity = res.getInteger(R.integer.settings_panel_layout_gravity);
Log.d(TAG, "mSettingsPanelGravity = " + mSettingsPanelGravity);
if (mSettingsPanelGravity <= 0) { if (mSettingsPanelGravity <= 0) {
mSettingsPanelGravity = Gravity.RIGHT | Gravity.TOP; mSettingsPanelGravity = Gravity.END | Gravity.TOP;
} }
mCarrierLabelHeight = res.getDimensionPixelSize(R.dimen.carrier_label_height); mCarrierLabelHeight = res.getDimensionPixelSize(R.dimen.carrier_label_height);

View File

@ -106,6 +106,7 @@ public class PhoneStatusBarView extends PanelBar {
@Override @Override
public PanelView selectPanelForTouch(MotionEvent touch) { public PanelView selectPanelForTouch(MotionEvent touch) {
final float x = touch.getX(); final float x = touch.getX();
final boolean isLayoutRtl = isLayoutRtl();
if (mFullWidthNotifications) { if (mFullWidthNotifications) {
// No double swiping. If either panel is open, nothing else can be pulled down. // No double swiping. If either panel is open, nothing else can be pulled down.
@ -130,7 +131,8 @@ public class PhoneStatusBarView extends PanelBar {
if (region < mSettingsPanelDragzoneMin) region = mSettingsPanelDragzoneMin; if (region < mSettingsPanelDragzoneMin) region = mSettingsPanelDragzoneMin;
return (w - x < region) ? mSettingsPanel : mNotificationPanel; final boolean showSettings = isLayoutRtl ? (x < region) : (w - region < x);
return showSettings ? mSettingsPanel : mNotificationPanel;
} }
@Override @Override

View File

@ -113,6 +113,7 @@ class QuickSettings {
private LevelListDrawable mChargingBatteryLevels; private LevelListDrawable mChargingBatteryLevels;
boolean mTilesSetUp = false; boolean mTilesSetUp = false;
boolean mUseDefaultAvatar = false;
private Handler mHandler; private Handler mHandler;
@ -155,6 +156,7 @@ class QuickSettings {
filter.addAction(BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED); filter.addAction(BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED);
filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED); filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);
filter.addAction(Intent.ACTION_USER_SWITCHED); filter.addAction(Intent.ACTION_USER_SWITCHED);
filter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
mContext.registerReceiver(mReceiver, filter); mContext.registerReceiver(mReceiver, filter);
IntentFilter profileFilter = new IntentFilter(); IntentFilter profileFilter = new IntentFilter();
@ -228,6 +230,7 @@ class QuickSettings {
avatar = new BitmapDrawable(mContext.getResources(), rawAvatar); avatar = new BitmapDrawable(mContext.getResources(), rawAvatar);
} else { } else {
avatar = mContext.getResources().getDrawable(R.drawable.ic_qs_default_user); avatar = mContext.getResources().getDrawable(R.drawable.ic_qs_default_user);
mUseDefaultAvatar = true;
} }
// If it's a single-user device, get the profile name, since the nickname is not // If it's a single-user device, get the profile name, since the nickname is not
@ -916,6 +919,10 @@ class QuickSettings {
applyBluetoothStatus(); applyBluetoothStatus();
} else if (Intent.ACTION_USER_SWITCHED.equals(action)) { } else if (Intent.ACTION_USER_SWITCHED.equals(action)) {
reloadUserInfo(); reloadUserInfo();
} else if (Intent.ACTION_CONFIGURATION_CHANGED.equals(action)) {
if (mUseDefaultAvatar) {
queryForUserInformation();
}
} }
} }
}; };

Some files were not shown because too many files have changed in this diff Show More