This is DEV project to mod UI to DroidWin V3
On development to me and @serajr
We request everyone to not post or ask quote here.
The results can be followed at DroidWin V2 thread
Thank U
:good:
SYSTEMUI
New Toggle Buttons L BALLS Blue
Erase lines dividers and stats
Erase Toggle text
Reorder toogle buttons
Transparent headers
Transparent notifications
Text colors HOLO
StatusBar On close remake light theme
Mod Quick Panel Settings with Blue Balls
The updates comes whit
AOSP Clear Button TOP
Created Quick Settings Toggles Panel access integration Kitkat
Add Custom Buttons
New Theme Blue Bubble Ball
XDA:DevDB Information
DROIDWIN UI, Device Specific App for all devices (see above for details)
Contributors
mjraogr, serajr
Version Information
Status: Nightly
Current Stable Version: DroidWin V2
Stable Release Date: 2015-01-13
Current Beta Version: DroidWin V2 Theme
Beta Release Date: 2014-11-28
Created 2015-01-06
Last Updated 2015-01-13
CODES ADD
my friend @serajr
Open this dev to us, its more easy to change
Im add newUI project decompiled folder .rar on dowloads window ; Im up to the droidwin framework-res and tw-framework-res cose its some mods
On attachments upload the two UI apks compileds the DroidwinV2 UI and new dev
After our previous talk today i'm decide replace somes codes and restore xmls the clear button stock way and settings button too . Im was erase the codes that have been wrote. Can you see on .rar , I just insert the xmls respectives to script positions like the same setting button on 39.0dip
So its working now and dont stop more on FC. working now but without show the newest toggle button created on pull down menu ok!
regard
MJ
quicksettings parameters to smali (toggle button)
Code:
Action: android.intent.action.MAIN
Class: com.mappz.quicksettings.ToggleServiceStarter
Package: com.studio.quicksettings
IDS
Code:
<item type="id" name="togglepanel">false</item>
<item type="id" name="togglepanel_button">false</item>
<item type="id" name="togglepanel_icon">false</item>
Drawables ids new
Code:
<public type="drawable" name="keylockwhite" id="0x7f0202d0" />
<public type="drawable" name="recentwhite" id="0x7f0202d1" />
<public type="drawable" name="tw_toggle_panel" id="0x7f0202d2" />
layout\toggle Button
Code:
<?xml version="1.0" encoding="utf-8"?>
<merge
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:orientation="vertical" android:focusable="false" android:layout_width="fill_parent" android:layout_height="@dimen/toggle_panel_button_height">
<ImageView android:layout_gravity="center" android:id="@id/togglepanel" android:layout_width="fill_parent" android:layout_height="@dimen/toggle_panel_button_image_height" android:layout_marginTop="@dimen/toggle_panel_button_margin_top" />
<TextView android:textSize="@dimen/toggle_panel_button_text_size" android:textColor="#ff648cff" android:gravity="center" android:id="@id/btn_text" android:layout_width="fill_parent" android:layout_height="0.0dip" android:includeFontPadding="false" />
<ImageView android:layout_gravity="center" android:id="@id/btn_status_image" android:paddingLeft="0.0dip" android:paddingTop="0.0dip" android:paddingRight="0.0dip" android:paddingBottom="0.0dip" android:layout_width="fill_parent" android:layout_height="0.0dip" android:scaleType="fitXY" android:drawable="@drawable/tw_quick_panel_off" />
</LinearLayout>
</merge>
This is the FC code on TW
Code:
# codigo abaixo modificado move settings_button pra esq e clear_button to middle top e add o toggle_panel_button no lugar do settings resultado é force closed relatado no txt
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:background="#ff001e27" 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:id="@id/settings_button" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/ic_notify_quicksettings" android:scaleType="center" android:contentDescription="@string/accessibility_settings_button" />
<ImageView android:id="@id/clear_all_button" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/ic_notify_clear" android:scaleType="center" android:contentDescription="@string/accessibility_clear_all" />
<RelativeLayout android:id="@id/togglepanel_button" android:background="#ff001e27" android:focusable="true" android:visibility="visible" android:layout_width="@dimen/status_bar_expanded_setting_width" android:layout_height="39.0dip">
<ImageView android:id="@id/togglepanel_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/tw_toggle_panel" android:scaleType="center" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:contentDescription="@string/accessibility_settings_button" />
</RelativeLayout>
</LinearLayout>
Bro, please attach unmodified SystemUI.apk!
Btw... you can't remove lines from xml if they have android:id flag set... compiler will fc for sure. If you don't want a specific layout line, put android:visibility="gone" instead!
Unmod upload
serajr said:
Bro, please attach unmodified SystemUI.apk!
Btw... you can't remove lines from xml if they have android:id flag set... compiler will fc for sure. If you don't want a specific layout line, put android:visibility="gone" instead!
Click to expand...
Click to collapse
Hi Bro
Ok understand, Im fixed excluding the clear buttons mods and after loading both UI and create Ids to toggle_panel. The doubt is how we i'll show this button, yet this setted with "@string/accessibility_settings_button" />
well, the second attach SystemUI[1].apk is the Droidwin v2 UI without the new button costumization but with this mod release bellow . Are you need the attach stock dedodex to compare right ? upload its now
New Toggle Buttons L BALLS Blue
Erase lines dividers and stats
Erase Toggle text
Reorder toogle buttons
Transparent headers
Transparent notifications
Text colors HOLO
StatusBar On close remake light theme
Mod Quick Panel Settings with Blue Balls
regards
MJ
Info Add
@serajr
This info is about dimens of button its dispensable
The code was i insert on 4 last lines on values\dimens.xml don't have relaction to toggle_panel button, its so clone the toggles of quick settings expanded so we must erase this lines
Reg.
MJ
mjraogr said:
@serajr
This info is about dimens of button its dispensable
The code was i insert on 4 last lines on values\dimens.xml don't have relaction to toggle_panel button, its so clone the toggles of quick settings expanded so we must erase this lines
Reg.
MJ
Click to expand...
Click to collapse
Thank you... by tomorrow morning I will take a look!!!
@mjraogr ... 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
Code:
<?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
Code:
<?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!!
serajr said:
@mjraogr ... 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
Code:
<?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
Code:
<?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!!
Click to expand...
Click to collapse
Nice job bro
I' ll done this great to do list ! It very home work today. Im office now.
I was left project folder still open on my desktop and I'll go use the created id to button ok.
Are you vocations?
See u
MJ
Sent from my GT-I8552 using XDA Free mobile app
mjraogr said:
Nice job bro
I' ll done this great to do list ! It very home work today. Im office now.
I was left project folder still open on my desktop and I'll go use the created id to button ok.
Are you vocations?
See u
MJ
Sent from my GT-I8552 using XDA Free mobile app
Click to expand...
Click to collapse
No I'm not, I'm working like a beast!!
Good luck!
Compiled
Morning @serajr
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
Code:
<?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
Code:
<?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
Code:
<?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>
Code:
<?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>
mjraogr said:
Morning @serajr
Click to expand...
Click to collapse
Morning...
First of all, don't use flag layout_toLeftOf (or any layout_to???) inside LinearLayout (our main layout), these flags are for RelativeLayout!!
- The new buttons you want to put into there don't need to be enclosed by a new layout, like the example I showed you, their lines can stay at root LinearLayout view
- Hex Ids aren't necessary right now, you can just create the ones you want inside ids.xml that on recompile process, apktool will give them their new hex number inside public.xml automatically
- Your newly created drawables selectors are both ok
- To remove header background I think we need to change things inside smali (later we do it)
- Try doing it simple this time, put just one new line inside tw_status_bar_expanded_header.xml like above example!
serajr said:
Morning...
First of all, don't use flag layout_toLeftOf (or any layout_to???) inside LinearLayout (our main layout), these flags are for RelativeLayout!!
- The new buttons you want to put into there don't need to be enclosed by a new layout, like the example I showed you, their lines can stay at root LinearLayout view
- Hex Ids aren't necessary right now, you can just create the ones you want inside ids.xml that on recompile process, apktool will give them their new hex number inside public.xml automatically
- Your newly created drawables selectors are both ok
- To remove header background I think we need to change things inside smali (later we do it)
- Try doing it simple this time, put just one new line inside tw_status_bar_expanded_header.xml like above example!
Click to expand...
Click to collapse
OK, Bro
I was start using the mod UI with the things that have been customized like colors, line dividers, brightness bar, bg and the toogle_button layout xml too . i must use only the unmod stock right?
Yes, the hex are automatic ids just did show to u see if the path names was set correctly
Doubt..
on the second compilation i left only you saying, the new btn line with diference in case put the android:visibilty . but didnt show btn
Code:
<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="Red"]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">
I remember right now.... if is trouble the dimens.xml lines set cause i forget erase it and the toggle_button layout xml properly created before is it conflits cause the described name set is the same of IDS used. " toggle_button "
tw_toggle_pannel_button.xml
Code:
<merge
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:orientation="vertical" android:focusable="false" android:layout_width="fill_parent" android:layout_height="@dimen/toggle_panel_button_height">
<ImageView android:layout_gravity="center" android:id="@id/togglepanel" android:layout_width="fill_parent" android:layout_height="@dimen/toggle_panel_button_image_height" android:layout_marginTop="@dimen/toggle_panel_button_margin_top" />
<TextView android:textSize="@dimen/toggle_panel_button_text_size" android:textColor="#ff648cff" android:gravity="center" android:id="@id/btn_text" android:layout_width="fill_parent" android:layout_height="0.0dip" android:includeFontPadding="false" />
<ImageView android:layout_gravity="center" android:id="@id/btn_status_image" android:paddingLeft="0.0dip" android:paddingTop="0.0dip" android:paddingRight="0.0dip" android:paddingBottom="0.0dip" android:layout_width="fill_parent" android:layout_height="0.0dip" android:scaleType="fitXY" android:drawable="@drawable/tw_quick_panel_off" />
</LinearLayout>
</merge>
Dimens toggle Button (this is dispensible right now)
Code:
<dimen name="toggle_panel_button_height">80.0dip</dimen>
<dimen name="toggle_panel_button_image_height">40.0dip</dimen>
<dimen name="toggle_panel_button_text_height">30.0dip</dimen>
<dimen name="toggle_panel_button_text_size">12.0dip</dimen>
<dimen name="toggle_panel_button_status_height">8.0dip</dimen>
<dimen name="toggle_panel_button_status_padding">2.0dip</dimen>
<dimen name="toggle_panel_button_margin_top">2.0dip</dimen>
I'll get the stock unmod UI and compile again placing just drawables, one diferent id, add the line on tw.
MJ
Sent from my GT-I8552 using XDA Free mobile app
New test on weekend
Hi Bro
Yesterday didnt work on test cause was busy time at work office.
So i'll work on weekend and try compile btn n stuff again on unmod UI
After, if we obtain success, ill complete trying to move the clear button to top change postiion inside the RelativeLayout
Good Week...
See u
MJ
01-09-2015 test UI new btn
Hi Bro @serajr
how do !
well lets start again test compilation on Unmod UI I made 2 tests
First test i follow instructions to new btn
Layout\ tw_status_bar_expanded_header - changed insert blue line code new btn
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock" android:textColor="#ff648cff" android:id="@id/clock" android:visibility="gone" 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" />
[COLOR="Blue"]<ImageView android:id="@id/droidwin_btn" android:background="@drawable/tw_quick_panel_setting_button_bg" android:layout_width="wrap_content" android:layout_height="39.0dip" android:src="@drawable/ic_notify_droidpanel" 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>
drawable folder
drawable src created and rescpective pngs on drawable-hdpi resolution itt same folder settings_btn
Compiled ok
Pass true, install true and load true but the new Button don't appear yet....
Change settings png and change colors text clock #ff000000 to #ff648cff for see modifications and interesting that the text colors not changed
View attachment 3107250
Second Test
Changed position new btn line before line divider and recompile
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock" android:textColor="#ff648cff" android:id="@id/clock" android:visibility="gone" 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" />
[COLOR="blue"] <ImageView android:id="@id/droidwin_btn" android:background="@drawable/tw_quick_panel_setting_button_bg" android:layout_width="wrap_content" android:layout_height="39.0dip" android:src="@drawable/ic_notify_droidpanel" android:scaleType="center" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:contentDescription="@null" />[/COLOR]
<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" />
<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>
Compiled ok
Pass true, install true and load true but the new Button don't appear yet....
On Third test
I used the every lines of statusbar_expanded_header (they are diferents) including new btn on tw_statusbar_expanded_header and the results was the same header items load and working normal that means the xml codes to modify don't be there in tw_statusbar_expanded_header
Code:
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:background="@drawable/notification_header_bg" android:layout_width="fill_parent" android:layout_height="wrap_content" 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:id="@id/clock" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:singleLine="true" />
<com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date" android:id="@id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:layout_marginRight="8.0dip" />
<com.android.systemui.statusbar.RotationToggle android:id="@id/rotation_lock_button" 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" />
<ImageView android:id="@id/settings_button" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/ic_notify_quicksettings" android:scaleType="center" android:contentDescription="@string/accessibility_settings_button" />
<Space android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_weight="1.0" />
<ImageView android:id="@id/clear_all_button" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/ic_notify_clear" android:scaleType="center" android:contentDescription="@string/accessibility_clear_all" />
[COLOR="blue"]<ImageView android:id="@id/droidwin_btn" android:background="@drawable/tw_quick_panel_setting_button_bg" android:layout_width="wrap_content" android:layout_height="39.0dip" android:src="@drawable/ic_notify_droidpanel" android:scaleType="center" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:contentDescription="@null" />[/COLOR]
</LinearLayout>
What we doing now, can we set line inside the RelativeLayout together quicksettings btn?
Or if must look for other XML , i'm thinking if try put the button on tw_status_bar_expanded_dual.xml close of the brigthness scroller
View attachment 3107312 View attachment 3107321 View attachment 3107322 View attachment 3107323
Step One Done - The new button is there!!!
My Bro @serajr We are done!!!
View attachment 3110607
After 4th test i think myself I had to get another xml and I found it .
The I8552 works sw320 - hdpi, i did new compilation change the color header pull down btw inside xml, and after textcolor. Whit this positive results put the new button and show now !!
The sw = 320- hdpi uses RelativeLayout and is a little different , I used the android : leftof and android : visible
Code:
<<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:layout_width="fill_parent" android:layout_height="39.0dip"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:background="#ff263238" android:layout_width="fill_parent" android:layout_height="39.0dip" android:baselineAligned="false"
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="#ff79beb9" 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:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date" android:textColor="#ff79beb9" 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" />
<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" />
</LinearLayout>
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" android:layout_alignParentRight="true">
<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>
<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" android:layout_toLeftOf="@id/settings_button" />
[COLOR="Blue"] <ImageView android:id="@id/droidwin_btn" android:background="@drawable/tw_quick_panel_setting_button_bg" [COLOR="red"]android:visibility="visible"[/COLOR] android:layout_width="wrap_content" android:layout_height="39.0dip" android:src="@drawable/ic_notify_droidpanel" [COLOR="Red"]android:layout_toLeftOf="@id/settings_button"[/COLOR] android:scaleType="center" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:contentDescription="@null" />[/COLOR]
</RelativeLayout>
Were two victories cause I found where to change the pull down colors
I moved the clear button to top and change for icon on mod UI
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Now Let's go to second part :laugh:
mjraogr said:
My Bro @serajr We are done!!!
View attachment 3110607
After 4th test i think myself I had to get another xml and I found it .
The I8552 works sw320 - hdpi, i did new compilation change the color header pull down btw inside xml, and after textcolor. Whit this positive results put the new button and show now !!
The sw = 320- hdpi uses RelativeLayout and is a little different , I used the android : leftof and android : visible
Code:
<<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:layout_width="fill_parent" android:layout_height="39.0dip"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:background="#ff263238" android:layout_width="fill_parent" android:layout_height="39.0dip" android:baselineAligned="false"
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="#ff79beb9" 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:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date" android:textColor="#ff79beb9" 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" />
<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" />
</LinearLayout>
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" android:layout_alignParentRight="true">
<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>
<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" android:layout_toLeftOf="@id/settings_button" />
[COLOR="Blue"] <ImageView android:id="@id/droidwin_btn" android:background="@drawable/tw_quick_panel_setting_button_bg" [COLOR="red"]android:visibility="visible"[/COLOR] android:layout_width="wrap_content" android:layout_height="39.0dip" android:src="@drawable/ic_notify_droidpanel" [COLOR="Red"]android:layout_toLeftOf="@id/settings_button"[/COLOR] android:scaleType="center" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:contentDescription="@null" />[/COLOR]
</RelativeLayout>
Were two victories cause I found where to change the pull down colors
I moved the clear button to top and change for icon on mod UI
View attachment 3110715
Now Let's go to second part :laugh:
Click to expand...
Click to collapse
Finally!! So, the density was the culprit!!!
You don't need to put android:visibility="visible", it's visible by default!
Ok... let's go ahead into smali!!
serajr said:
Finally!! So, the density was the culprit!!!
You don't need to put android:visibility="visible", it's visible by default!
Ok... let's go ahead into smali!!
Click to expand...
Click to collapse
Ok, !!
I1ll go modify and this.
Well meanwhile i'll work on issues themes of colors etc ... Something can i do to prepare smali?
rg
MJ
mjraogr said:
Ok, !!
I1ll go modify and this.
Well meanwhile i'll work on issues themes of colors etc ... Something can i do to prepare smali?
rg
MJ
Click to expand...
Click to collapse
I will come back here soon with smali code snippet!
serajr said:
I will come back here soon with smali code snippet!
Click to expand...
Click to collapse
Nice!
Just send u again bellow parameters script to facility
Action: android.intent.action.MAIN
Class: com.mappz.quicksettings.ToggleServiceStarter
Package: com.studio.quicksettings
good work !
mjraogr said:
Nice!
Just send u again bellow parameters script to facility
Action: android.intent.action.MAIN
Class: com.mappz.quicksettings.ToggleServiceStarter
Package: com.studio.quicksettings
good work !
Click to expand...
Click to collapse
Ok, let's go...
PhoneStatusBar.smali
Under # instance fields add red lines:
Code:
# instance fields
[COLOR="red"].field mDroidWinButton:Landroid/view/View;
.field private mDroidWinButtonListener:Landroid/view/View$OnClickListener;[/COLOR]
.field brightnessController:Landroid/view/View;
.field doNotDisturbIcon:Landroid/view/View;
Under method below put red lines (see spaces):
Code:
[B].method public constructor <init>()V[/B]
.locals 4
.prologue
const/4 v0, -0x1
const/4 v3, 0x2
const/4 v2, 0x0
const/4 v1, 0x0
.
.
.
.line 3885
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$30;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$30;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStopTracing:Ljava/lang/Runnable;
[COLOR="red"].line 7002
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$31;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/[COLOR="Blue"]PhoneStatusBar$31[/COLOR];-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDroidWinButtonListener:Landroid/view/View$OnClickListener;[/COLOR]
.line 3990
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryTextObserver:Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver;
.
.
.
PhoneStatusBar$31 is the new smali file you need to include at same place PhoneStatusBar.smali file is (attached)
Under method below put red lines (see spaces):
Code:
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.locals 22
.prologue
.line 540
move-object/from16 v0, p0
.
.
.
.line 742
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSettingsButton:Landroid/view/View;
move-object/from16 v18, v0
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSettingsButtonListener:Landroid/view/View$OnClickListener;
move-object/from16 v19, v0
invoke-virtual/range {v18 .. v19}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
[COLOR="Red"].line 7000
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
move-object/from16 v18, v0
const v19, [COLOR="blue"]0x7f0d????[/COLOR] [COLOR="Black"][B]# << droidwin_btn GENERATED HEX ID GOES HERE[/B][/COLOR]
invoke-virtual/range {v18 .. v19}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v18
move-object/from16 v0, v18
move-object/from16 v1, p0
iput-object v0, v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDroidWinButton:Landroid/view/View;
.line 7001
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDroidWinButton:Landroid/view/View;
move-object/from16 v18, v0
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDroidWinButtonListener:Landroid/view/View$OnClickListener;
move-object/from16 v19, v0
invoke-virtual/range {v18 .. v19}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V[/COLOR]
.line 743
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
move-object/from16 v18, v0
const v19, 0x7f0d0052
invoke-virtual/range {v18 .. v19}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v18
check-cast v18, Lcom/android/systemui/statusbar/RotationToggle;
move-object/from16 v0, v18
move-object/from16 v1, p0
iput-object v0, v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mRotationButton:Lcom/android/systemui/statusbar/RotationToggle;
.
.
.
Change blue hex value above ^^^^ !!!
Code inside PhoneStatusBar$31.smali (new file) will check if "com.studio.quicksettings" package exists (is installed) just before launch it, otherwise we will get a FC!
That´s it... compile it and replace apk! (Try at your own risk)...
Edit.: Fixed PhoneStatusBar$31.smali file attached!
So it was Dec of 2016 when I was working on a ROM called GravityOS for Yu Yureka device. Since it was an AOSP based ROM, I was in a serious need of this mod as I always used this on CM ROMs. I searched on XDA and found some but sadly they didn't work for Lollipop base. Finally I decided to code my own and here is the result.
Difficulty level
Easy
Requirements
1. Working connection to ADB, data cable and an AOSP based ROM
2. APK Multi-tool
3. Knowledge of basic compiling and decompiling as I will not be discussing it here
4. Some patience
Disclaimer
The following mod has been tested on an AOSP based ROM and found to be safe and functional. Yet I take no responsibility if anything wrong happens with your device.
Process
1. Pull SystemUI.apk and Settings.apk from phone. Decompile them.
2. Download the zip attached here and place the smali in appropriate folder while keeping the folder structure intact.
3. Now add double tap to statusbar. For this open SystemUI.apk/res/layouts/status_bar.xml just after the root element place this:
PHP:
<com.android.systemui.DLock android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="fill_parent" />
So that it would look like:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.PhoneStatusBarView androidrientation="vertical" android:id="@id/msim_status_bar" android:background="@drawable/system_bar_background" android:focusable="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<com.android.systemui.DLock android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="fill_parent" />
4. Next step is to add the setting to toggle this in Settings.apk
Open Settings.apk/res/xml/display.xml and add
PHP:
<com.android.settings.gravity.SystemSwitchPreference android:title="Double tap status bar to sleep" android:key="double_tap_sb_sleep" android:summary="Double tapping the status bar makes the device sleep" android:defaultValue="true" />
Compile both the APKs and push to your phone. Restart and enjoy.
You may obtain latest smali and Java files from Github
Great job bro.
Hats off. No good guide was available in the whole XDA forum for it and you made it. Awesome.
One question, can we use it in other parts of systemUI like status bar header?
And a kind request, please also make a guide for changing colors of TextClock, Text View and Image View through settings.
nitesh9 said:
Great job bro.
Hats off. No good guide was available in the whole XDA forum for it and you made it. Awesome.
One question, can we use it in other parts of systemUI like status bar header?
And a kind request, please also make a guide for changing colors of TextClock, Text View and Image View through settings.
Click to expand...
Click to collapse
Yes bro. Ofcourse you can. Putting the view com.android.systemui.DLock in other view listens for double click. Practically this would work for any view.
Yes, soon will be making guides for other mods as well.
Congratulations on your Mod ..
It is fantastic .. it works very well.
To see if your next mod is navigation bar of CyanogenMod ..
Thanks for everything