CM9(4.0.4)状态栏美化(青白色风格)

以下操作均在SystemUI.apk反编译所得文件的基础上进行。

1.状态栏底色透明:

文本编辑器打开\SystemUI\smali\com\android\systemui\statusbar\StatusBar.smali,查找“const/16 v16, 0x4”,改为“const/16 v16, -0x3”;

2.layout中底色改变:

2.1 状态栏底色修改,\layout\status_bar_tracking.xml修改为如下

<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.TrackingView android:orientation="vertical" android:background="#ffffffff" android:paddingLeft="0.0px" android:paddingRight="0.0px" android:paddingBottom="0.0px" android:focusable="true" android:visibility="gone" android:descendantFocusability="afterDescendants"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
        <com.android.systemui.statusbar.phone.CarrierLabel android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:layout_gravity="bottom" android:paddingBottom="20.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" />
    </FrameLayout>
    <com.android.systemui.statusbar.phone.CloseDragHandle android:orientation="vertical" android:id="@id/close" android:layout_width="fill_parent" android:layout_height="wrap_content">
        <ImageView android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/status_bar_close_on" android:scaleType="fitXY" />
    </com.android.systemui.statusbar.phone.CloseDragHandle>
</com.android.systemui.statusbar.phone.TrackingView>

 2.2 \layout-land\status_bar_recent_item.xml修改如下:

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:paddingLeft="@dimen/status_bar_recents_item_padding" android:paddingRight="@dimen/status_bar_recents_item_padding" android:layout_width="wrap_content" android:layout_height="fill_parent"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <RelativeLayout android:layout_gravity="center_vertical" android:id="@id/recent_item" android:paddingTop="@android:dimen/status_bar_height" android:layout_width="wrap_content" android:layout_height="wrap_content">
        <FrameLayout android:id="@id/app_thumbnail" android:background="@drawable/recents_thumbnail_bg" android:visibility="invisible" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/status_bar_recents_thumbnail_left_margin" android:layout_marginTop="@dimen/status_bar_recents_thumbnail_top_margin" android:foreground="@drawable/recents_thumbnail_fg" android:layout_alignParentLeft="true" android:layout_alignParentTop="true">
            <ImageView android:id="@id/app_thumbnail_image" android:layout_width="@dimen/status_bar_recents_thumbnail_width" android:layout_height="@dimen/status_bar_recents_thumbnail_height" />
        </FrameLayout>
        <ImageView android:id="@id/app_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/status_bar_recents_app_icon_left_margin" android:layout_marginTop="@dimen/status_bar_recents_app_icon_top_margin" android:scaleType="centerInside" android:adjustViewBounds="true" android:maxWidth="@dimen/status_bar_recents_app_icon_max_width" android:maxHeight="@dimen/status_bar_recents_app_icon_max_height" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" />
        <TextView android:textSize="@dimen/status_bar_recents_app_label_text_size" android:textColor="@color/status_bar_recents_app_label_color" android:ellipsize="marquee" android:id="@id/app_label" android:fadingEdge="horizontal" android:fadingEdgeLength="@dimen/status_bar_recents_fading_edge_length" android:layout_width="@dimen/status_bar_recents_app_label_width" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin" android:layout_marginTop="@dimen/status_bar_recents_text_description_padding" android:scrollHorizontally="true" android:singleLine="true" android:layout_below="@id/app_thumbnail" android:layout_alignLeft="@id/app_thumbnail" />
        <TextView android:textSize="@dimen/status_bar_recents_app_description_text_size" android:textColor="@color/status_bar_recents_app_label_color" android:ellipsize="marquee" android:id="@id/app_description" android:fadingEdge="horizontal" android:fadingEdgeLength="@dimen/status_bar_recents_fading_edge_length" android:layout_width="@dimen/status_bar_recents_app_label_width" android:layout_height="wrap_content" android:layout_marginTop="@dimen/status_bar_recents_text_description_padding" android:scrollHorizontally="true" android:singleLine="true" android:layout_below="@id/app_label" android:layout_alignLeft="@id/app_thumbnail" />
    </RelativeLayout>
</FrameLayout>

 3.\values内容的修改

3.1 colors.xml修改如下:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="status_bar_recents_app_label_color">#ff000000</color>
    <color name="notification_list_shadow_top">#80000000</color>
</resources>

 3.2drawables.xml修改如下:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <item type="drawable" name="APKTOOL_DUMMY_00d4">false</item>
    <item type="drawable" name="APKTOOL_DUMMY_00d5">false</item>
    <item type="drawable" name="APKTOOL_DUMMY_00d6">false</item>
    <item type="drawable" name="APKTOOL_DUMMY_00d7">false</item>
    <item type="drawable" name="APKTOOL_DUMMY_00d8">false</item>
    <item type="drawable" name="APKTOOL_DUMMY_00d9">false</item>
    <item type="drawable" name="APKTOOL_DUMMY_00da">false</item>
    <item type="drawable" name="APKTOOL_DUMMY_00db">false</item>
    <item type="drawable" name="APKTOOL_DUMMY_00dd">false</item>
    <item type="drawable" name="APKTOOL_DUMMY_00de">false</item>
    <item type="drawable" name="APKTOOL_DUMMY_00df">false</item>
    <item type="drawable" name="APKTOOL_DUMMY_00e0">false</item>
    <item type="drawable" name="APKTOOL_DUMMY_00e1">false</item>
    <item type="drawable" name="APKTOOL_DUMMY_00e2">false</item>
    <item type="drawable" name="APKTOOL_DUMMY_00e3">false</item>
    <item type="drawable" name="APKTOOL_DUMMY_00e4">false</item>
    <item type="drawable" name="APKTOOL_DUMMY_00e5">false</item>
    <item type="drawable" name="notification_number_text_color">#ff000000</item>
    <item type="drawable" name="notification_item_background_color">#ffffffff</item>
    <item type="drawable" name="notification_item_background_color_pressed">#ff257390</item>
    <item type="drawable" name="ticker_background_color">#ffffffff</item>
    <item type="drawable" name="status_bar_background">#ef3f9bbf</item>
    <item type="drawable" name="status_bar_recents_background_solid">#b3000000</item>
    <item type="drawable" name="status_bar_recents_app_thumbnail_background">#88ffffff</item>
    <item type="drawable" name="status_bar_notification_row_background_color">#7f090909</item>
    <item type="drawable" name="notification_header_bg">#ffffffff</item>
    <item type="drawable" name="notification_tracking_bg">#ffffffff</item>
    <item type="drawable" name="recents_callout_line">#99ffffff</item>
    <item type="drawable" name="notification_item_background_legacy_color">#ffaaaaaa</item>
</resources>

 3.3 style修改如下:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="TextAppearance.StatusBar.Title" parent="@android:style/TextAppearance.StatusBar">
        <item name="android:textAppearance">?android:textAppearanceSmall</item>
        <item name="android:textStyle">bold</item>
        <item name="android:textColor">?android:textColorPrimary</item>
    </style>
    <style name="TextAppearance.StatusBar.IntruderAlert" parent="@android:style/TextAppearance.StatusBar" />
    <style name="TextAppearance.StatusBar.SystemPanel" parent="@android:style/TextAppearance.StatusBar">
        <item name="android:textAppearance">?android:textAppearance</item>
        <item name="android:textStyle">normal</item>
        <item name="android:textColor">#ff808080</item>
    </style>
    <style name="TextAppearance.StatusBar.TextButton" parent="@android:style/TextAppearance.StatusBar">
        <item name="android:textAppearance">?android:textAppearance</item>
        <item name="android:textStyle">normal</item>
        <item name="android:textColor">#ffffffff</item>
    </style>
    <style name="TextAppearance.StatusBar.Battery" parent="@android:style/TextAppearance.StatusBar.Icon">
        <item name="android:textSize">12.0dip</item>
        <item name="android:textStyle">normal</item>
        <item name="android:textColor">@android:color/holo_blue_light</item>
    </style>
    <style name="TextAppearance.StatusBar.Clock" parent="@android:style/TextAppearance.StatusBar.Icon">
        <item name="android:textSize">16.0dip</item>
        <item name="android:textStyle">normal</item>
        <item name="android:textColor">#ffffffff</item>
    </style>
    <style name="TextAppearance.StatusBar.Date" parent="@android:style/TextAppearance.StatusBar.Icon">
        <item name="android:textSize">16.0sp</item>
        <item name="android:textStyle">normal</item>
        <item name="android:textColor">@android:color/holo_blue_light</item>
    </style>
    <style name="TextAppearance.StatusBar.Signal" parent="@android:style/TextAppearance.StatusBar.Icon">
        <item name="android:textSize">12.0dip</item>
        <item name="android:textStyle">normal</item>
        <item name="android:textColor">@android:color/holo_blue_light</item>
    </style>
    <style name="Animation" />
    <style name="Animation.ShirtPocketPanel" parent="@style/Animation">
        <item name="android:windowEnterAnimation">@android:anim/grow_fade_in_from_bottom</item>
        <item name="android:windowExitAnimation">@android:anim/shrink_fade_out_from_bottom</item>
    </style>
    <style name="Animation.RecentPanel" parent="@style/Animation">
        <item name="android:windowEnterAnimation">@android:anim/grow_fade_in_from_bottom</item>
        <item name="android:windowExitAnimation">@android:anim/shrink_fade_out_from_bottom</item>
    </style>
    <style name="Animation.StatusBar" parent="@style/Animation">
        <item name="android:windowEnterAnimation">@anim/status_bar_enter</item>
        <item name="android:windowExitAnimation">@anim/status_bar_exit</item>
    </style>
    <style name="Animation.StatusBar.IntruderAlert" parent="@style/Animation.StatusBar">
        <item name="android:windowEnterAnimation">@anim/priority_alert_enter</item>
        <item name="android:windowExitAnimation">@anim/priority_alert_exit</item>
    </style>
    <style name="TextAppearance.StatusBar.PhoneTicker" parent="@android:style/TextAppearance.StatusBar.Ticker">
        <item name="android:textSize">14.0dip</item>
    </style>
    <style name="BrightnessPanel">
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowAnimationStyle">@android:style/Animation.VolumePanel</item>
        <item name="android:windowActionBar">false</item>
        <item name="android:windowCloseOnTouchOutside">true</item>
    </style>
</resources>

 3.4 public.xml的修改,根据增加的内容进行修改。

4./drawable的内容将附件覆盖到相应目录。

5.效果图:


猜你喜欢

转载自dss16694.iteye.com/blog/1614220
今日推荐