[Optimus L3, L5, L7 Android Development] drdexter1989:
Hi everybody

This is my first thread about android development on my L7 device. A few days ago i was searching in XDA about status bar transparency for CM 10.1, so all info that i found gives me a good result. I will explain you how to change status bar color and get transparency.

Please read: I am not responsible for damage to your device in the carrying out of these procedures

First you must have knowledgement of apk compiling and decompiling using apktool. I will not explain it in this thread.

So let's go to work:

1. Decompile android.policy.jar

Open android.policy.jar\smali\com\android\internal\policy\implPhoneWindowManager.smali and find this method.

.method public getSystemDecorRectLw(Landroid/graphics/Rect;)I

SELECT it until its .end method and DELETE IT

2. Replace by this method

.method public getSystemDecorRectLw(Landroid/graphics/Rect;)I
.registers 3
.parameter "systemRect"

.prologue
.line 3051
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemLeft:I

iput v0, p1, Landroid/graphics/Rect;->left:I

.line 3052
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemTop:I

iput v0, p1, Landroid/graphics/Rect;->top:I

.line 3053
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemRight:I

iput v0, p1, Landroid/graphics/Rect;->right:I

.line 3054
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemBottom:I

iput v0, p1, Landroid/graphics/Rect;->bottom:I

.line 3057
const/4 v0, 0x0

return v0
.end method

3. That's all for android.policy.jar, so then compile it

4. Next step is decompiling SystemUI.apk

If have done, gone to SystemUi.apk/res/layout/status_bar_expanded_header.xml, In XML LINE 2 replace with my line

<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/header" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" android:baselineAligned="false"

5. Open SystemUI.apk/res/values/drawables.xml

find this line

<item type="drawable" name="status_bar_background">[COLOR="Red"]#00000000[/COLOR]</item>

You have only change the red text by #88000000 for 100% transparency, or select one of the following values: (you can use any alpha color for this, in my case is black)

#00000000 - 100% transparency

#3F000000 - 75% transparency

#7F000000 - 50% transparency

#BF000000 - 25% transparency

That's all for SystemUI.apk son you can compile it and put in /system/app and give permissions to 644

To get 4 Tiles columns in QuickSettings just do next steps.

1. Open decompiled SystemUI.apk/res/layout/status_bar_expanded_header.xml

Go to XML Line 2 and replace by my line

<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/header" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" android:baselineAligned="false"

2. Open SystemUI.apk/res/values/integers.xml

Find this line

<integer name="quick_settings_num_columns">[COLOR="Red"]3[/COLOR]</integer>

3 Is stock, change it for 4 or 5 if you want 4 tiles or 5 tiles columns.

3. Open SystemUI.apk/res/values/dimens.xml

3.1 Find out this line

<dimen name="notification_panel_header_height">[COLOR="red"]48.0dip[/COLOR]</dimen>

You must change the inside dimen value to 60.0dip

3.2 Find out this line

<dimen name="quick_settings_cell_height">[COLOR="red"]110.0dip[/COLOR]</dimen>

Change 110.0dip value to 100.0dip

4. Open decompiled SystemUI.apk/res/layout/styles.xml

Now, we have to change font size to adapt to our tiles columns, so find this line

<style name="TextAppearance.QuickSettings.TileView" parent="@style/TextAppearance.QuickSettings">
<item name="android:textSize">[COLOR="red"]12.0dip[/COLOR]</item>

Change 12.0dip to a small size like 9.0dip

That's all, Job done and now compile SystemUI.apk, if you don't know how to do all this, just flash my zip with 50% transparency and 4 Tiles columns [Tested on L7 CM 10.1 Beta 3]