[Android Apps and Games] mjraogr:
Compiled

Morning [MENTION=3989065]serajr[/MENTION]

Well, work strong and what i've done

Step One

Beyond the new btn, I inserted also completed with the recent button on left side positition. In case the previous error to don't show us recent btn occurred cause the " recentwhite " png was without xml sources on set, was floating...

Set the android:background to ff384248 just to see that return effect ( Do u believe that didn't find correct location on this device to change colors pull down header yet:(

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:background="#ff384248" 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="#ff648cff" 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="#ff648cff" 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" />
[COLOR="Blue"]<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/recent_apps" android:paddingLeft="2.0dip" android:paddingRight="1.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_recentwhite" android:layout_toLeftOf="@id/togglepanel_button" android:contentDescription="@string/accessibility_recent" systemui:keyCode="187" systemui:glowBackground="@drawable/ic_sysbar_highlight" />[/COLOR]
<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/togglepanel_button" android:background="@drawable/tw_quick_panel_setting_button_bg" android:layout_width="wrap_content" android:layout_height="39.0dip" android:src="@drawable/ic_notify_togglepanel" android:scaleType="center" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:contentDescription="@null" />[/COLOR]
<RelativeLayout android:id="@id/settings_button" android:background="#ff384248" 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>

So i was replace blue line src to set the ic_recentwhite to use these icons. Create xml srcs and then states icons with IcoFx windows program

Step two

a) I used one of ids created before to new btn

b) Cloned the ic_notify_quicksetting.xml

c) Replaced the same way that u taught me to set src. So created theses pngs normal and press btn states

step 3

Then compiled but the first build returns apktool layout\tw_status_bar_expanded_header.xml:9: error: Error: String types not allowed (at 'layout_toLeftOf' with value 'id/@togglepanel_button'). couse i forget to write the @ in the correct position ... sleep ...:silly

and end ...... recompile it pass and installed but unrapply dont show button

Second test

Im decompiled last compilation and get the public codes the red line was used

<public type="id" name="togglepanel" id="0x7f0d0140" />

<public type="drawable" name="tw_toggle_panel" id="0x7f0202d2" />

<public type="id" name="togglepanel_button" id="0x7f0d0141" />

<public type="id" name="togglepanel_icon" id="0x7f0d0142" />

<public type="drawable" name="ic_notify_togglepanel" id="0x7f0202d4" />

<public type="drawable" name="ic_notify_togglepanel_normal" id="0x7f0202d5" />

<public type="drawable" name="ic_notify_togglepanel_pressed" id="0x7f0202d6" />

<public type="drawable" name="keylockwhite" id="0x7f0202d0" />

<public type="drawable" name="recentwhite" id="0x7f0202d1" />

<public type="drawable" name="ic_notify_clear_focus" id="0x7f0202d3" />

<public type="drawable" name="ic_recentwhite" id="0x7f0202d7" />

<public type="drawable" name="ic_recentwhite_normal" id="0x7f0202d8" />

<public type="drawable" name="ic_recentwhite_pressed" id="0x7f0202d9" />

1) Erased the recentwhite buttons line left just the new btn on tw_satus bar expanded header

2) Insert the parameter android:visibility="visible" for toggle_button

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:background="#ff384248" 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="#ff648cff" 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="#ff648cff" 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" />
<ImageView android:id="@id/togglepanel_button" android:background="@drawable/tw_quick_panel_setting_button_bg" [COLOR="Blue"]android:visibility="visible" [/COLOR]android:layout_width="wrap_content" android:layout_height="39.0dip" android:src="@drawable/ic_notify_togglepanel" android:scaleType="center" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:contentDescription="@null" />
<RelativeLayout android:id="@id/settings_button" android:background="#ff384248" 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>

3) Keep on drawables xml folder the ic_recentwhite.xml and pngs btn also for don't FC, then recompile again

Results

Its installed and loading well but keep hidden toogle_button, dont have btn yet.

View attachment 3104095

Thinking...

1) Could be double position 39.dpi or something is missing in tw_status_bar_expanded_dual on simple reference?

2) We must be considering relative layout like settings_button or need modify framework and policy.jar?

3) Im wrote or done something wrong?

Regard

MJ

Src registers

<?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/ic_notify_togglepanel_pressed" />
<item android:drawable="@drawable/ic_notify_togglepanel_normal" />
</selector>

<?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/ic_recentwhite_pressed" />
<item android:drawable="@drawable/ic_recentwhite_normal" />
</selector>