[Android Apps and Games] serajr:
[MENTION=5701299]mjraogr[/MENTION] ... Let's start by putting new button image there at expanded panel header.

New button is the red line

tw_status_bar_expanded_header.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="39.0dip" android:baselineAligned="false"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock" android:textColor="#ffffffff" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="4.0dip" android:layout_marginTop="-3.0dip" android:singleLine="true" systemui:ampmSmall="true" />
<com.android.systemui.statusbar.policy.DateView android:textSize="16.0dip" android:textStyle="normal" android:textColor="#ffffffff" android:ellipsize="none" android:id="@id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:layout_marginRight="4.0dip" android:maxLines="2" android:textAllCaps="true" />
<com.android.systemui.statusbar.RotationToggle android:id="@id/rotation_lock_button" android:visibility="gone" android:clickable="true" android:layout_width="32.0dip" android:layout_height="32.0dip" android:layout_margin="8.0dip" android:button="@drawable/ic_notify_rotation" android:contentDescription="@string/accessibility_rotation_lock_off" />
<Space android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_weight="1.0" />
<ImageView android:layout_width="1.0dip" android:layout_height="25.0dip" android:layout_marginTop="7.0dip" android:layout_marginBottom="7.0dip" android:src="@drawable/tw_quick_panel_plnm_setting_dv" />

[COLOR="red"]<ImageView android:id="@id/[COLOR="Blue"]here_goes_the_new_id_name[/COLOR]" android:background="@drawable/tw_quick_panel_setting_button_bg" android:layout_width="wrap_content" android:layout_height="39.0dip" android:src="@drawable/[COLOR="blue"]here_goes_the_new_xml_drawable_name[/COLOR]" android:scaleType="center" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:contentDescription="@null" />[/COLOR]

<RelativeLayout android:id="@id/settings_button" android:background="@drawable/tw_quick_panel_setting_button_bg" android:focusable="true" android:visibility="visible" android:layout_width="@dimen/status_bar_expanded_setting_width" android:layout_height="39.0dip">
<ImageView android:id="@id/settings_button_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/tw_quickpanel_icon_settings" android:scaleType="center" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:contentDescription="@string/accessibility_settings_button" />
</RelativeLayout>
</LinearLayout>

The main header layout is a LinearLayout with horizontal orientation, so, the views into it will be filled from left to right. The new buttom will be just before last one (reposition it if needed). Pay attention on blue names you need to replace!

For the drawable selector, do a clone from ic_notify_clear.xml to the name you want and change its contents to new drawables:

ic_notify_?????.xml

<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/[COLOR="blue"]ic_notify_?????_pressed[/COLOR]" />
<item android:drawable="@drawable/[COLOR="blue"]ic_notify_?????_normal[/COLOR]" />
</selector>

If you want to remove unwanted views, don't remove their lines, just "gone" them!!

Compile and replace apk! If we get success the new button will be there, but with no function yet!!