[GUIDE]How to make CM7 DateView Removed on Statusbar like JellyBean CM10 - Android Themes

Hello guys, long time no see and long time to find this source code..
this source code made by Jmkl six and my alien friend Rizaleon give me this source. This source only for Samsung Galaxy Young Phone with stock ROM, but here i has been change some code for working on CM7 ROM. So, here we go!!​
First you need to see my screenshot :
{
"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"
}
First Step :
1. you must know how to decompiling/compiling apk
2. knowledge about editing smali/xml
3. you must have apktool/apkmanager
Second Step :
1. Pull your SystemUI.apk and Framework-res.apk
2. Do if framework on apktool/apkmanager
3. Decompile your SystemUI.apk and open statusbarservice.smali
Third Step :
1. Find this line :
Code:
.method getExpandedHeight()I
- And delete this line :
Code:
iget-object v1, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStatusBarView:Lcom/android/systemui/statusbar/CmStatusBarView;
invoke-virtual {v1}, Lcom/android/systemui/statusbar/CmStatusBarView;->getHeight()I
move-result v1
sub-int/2addr v0, v1
2. Find this line :
Code:
const v4, 0x20300
- Change this line :
Code:
const/16 v3, 0x7de
- To this line :
Code:
const/16 v3, 0x7d3
3. Find this line :
Code:
method onTrackingViewAttached()V
- Change this line :
Code:
const/16 v4, 0x7de
- To this line :
Code:
const/16 v4, 0x7d3
4. Find this line :
Code:
.method updateExpandedViewPos(I)V
- Look at this line :
Code:
.line 1627
.end local v2 #disph:I
.end local v3 #h:I
:cond_2
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStatusBarView:Lcom/android/systemui/statusbar/CmStatusBarView;
invoke-virtual {v8}, Lcom/android/systemui/statusbar/CmStatusBarView;->getHeight()I
move-result v8
move v3, v8
- Delete this line :
Code:
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStatusBarView:Lcom/android/systemui/statusbar/CmStatusBarView;
invoke-virtual {v8}, Lcom/android/systemui/statusbar/CmStatusBarView;->getHeight()I
move-result v8
move v3, v8
- And now paste this line after :cond_2 :
Code:
const/4 v3, 0x0
- So will look like this :
Code:
.line 1627
.end local v2 #disph:I
.end local v3 #h:I
:cond_2
const/4 v3, 0x0
5. Save your smali file and close.
Fourth Step :
1. Open status_bar.xml and find this line :
Code:
<com.android.systemui.statusbar.DateView
- Change the this line :
Code:
android:background="@drawable/xxxxx"
- To this line :
Code:
android:background="@drawable/trans"
- So will look like this :
Code:
<com.android.systemui.statusbar.DateView android:background="@drawable/trans"
2. Save your XML file and Recompile your SystemUI.apk then push it to /system/app
3. Goodluck
Click to expand...
Click to collapse
NB :
1. you must have a transparant picture and rename it to "trans.png" and move it to "drawable-xxxx" folder. look at below for resolution :
hdpi : 480x25 pixels
mdpi : 320x25 pixels
ldpi : 240x25 pixel
Credit :
- Jmkl six
- Rizaleon
- Samsung Galaxy Young Official Group Indonesian
- Alien Inside Themer Team
- Tiny Anastasia Development

petrukgrinder said:
Hello guys, long time no see and long time to find this source code..
this source code made by Jmkl six and my alien friend Rizaleon give me this source. This source only for Samsung Galaxy Young Phone with stock ROM, but here i has been change some code for working on CM7 ROM. So, here we go!!​
First you need to see my screenshot :
NB :
1. you must have a transparant picture and rename it to "trans.png" and move it to "drawable-xxxx" folder. look at below for resolution :
hdpi : 480x25 pixels
mdpi : 320x25 pixels
ldpi : 240x25 pixel
Credit :
- Jmkl six
- Rizaleon
- Samsung Galaxy Young Official Group Indonesian
- Alien Inside Themer Team
- Tiny Anastasia Development
Click to expand...
Click to collapse
ohh menn.. your awesome.. !
nice guide.. :thumbup:
Sent from my GT-I8150 using xda premium
---------- Post added at 03:17 PM ---------- Previous post was at 03:16 PM ----------
Hello guys, long time no see and long time to find this source code..<br />
this source code made by Jmkl six and my alien friend Rizaleon give me this source. This source only for <font color="Red">Samsung Galaxy Young Phone with stock ROM</font>, but here i has been change some code for <font color="Red">working on CM7 ROM</font>. So, here we go!!<br />
<br />
<b>First you need to see my screenshot :</b><br />
<br />
<br />
<b>First Step :</b><br />
1. you must know how to decompiling/compiling apk<br />
2. knowledge about editing smali/xml<br />
3. you must have apktool/apkmanager<br />
<br />
<b>Second Step :</b><br />
1. Pull your <font color="Blue">SystemUI.apk</font> and <font color="Blue">Framework-res.apk</font><br />
2. Do <font color="Blue">if framework</font> on apktool/apkmanager<br />
3. Decompile your <font color="Blue">SystemUI.apk</font> and open <font color="Blue">statusbarservice.smali</font><br />
<br />
<b>Third Step :</b><br />
1. Find this line :<br />
.method getExpandedHeight()I
Click to expand...
Click to collapse
<br />
- And delete this line :<br />
iget-object v1, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStatusBarView:Lcom/android/systemui/statusbar/CmStatusBarView;<br />
<br />
invoke-virtual {v1}, Lcom/android/systemui/statusbar/CmStatusBarView;->getHeight()I<br />
<br />
move-result v1<br />
<br />
sub-int/2addr v0, v1
Click to expand...
Click to collapse
<br />
<br />
2. Find this line :<br />
const v4, 0x20300
Click to expand...
Click to collapse
<br />
- Change this line :<br />
const/16 v3, 0x7de
Click to expand...
Click to collapse
<br />
- To this line :<br />
const/16 v3, 0x7d3
Click to expand...
Click to collapse
<br />
<br />
3. Find this line :<br />
method onTrackingViewAttached()V
Click to expand...
Click to collapse
<br />
- Change this line : <br />
const/16 v4, 0x7de
Click to expand...
Click to collapse
<br />
- To this line : <br />
const/16 v4, 0x7d3
Click to expand...
Click to collapse
<br />
<br />
4. Find this line :<br />
.method updateExpandedViewPos(I)V
Click to expand...
Click to collapse
<br />
- Look at this line :<br />
.line 1627<br />
.end local v2 #disph:I<br />
.end local v3 #h:I<br />
:cond_2<br />
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStatusBarView:Lcom/android/systemui/statusbar/CmStatusBarView;<br />
<br />
invoke-virtual {v8}, Lcom/android/systemui/statusbar/CmStatusBarView;->getHeight()I<br />
<br />
move-result v8<br />
<br />
move v3, v8
Click to expand...
Click to collapse
<br />
- Delete this line :<br />
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStatusBarView:Lcom/android/systemui/statusbar/CmStatusBarView;<br />
<br />
invoke-virtual {v8}, Lcom/android/systemui/statusbar/CmStatusBarView;->getHeight()I<br />
<br />
move-result v8<br />
<br />
move v3, v8
Click to expand...
Click to collapse
<br />
- And now paste this line after <font color="Blue">:cond_2</font> :<br />
const/4 v3, 0x0
Click to expand...
Click to collapse
<br />
- So will look like this :<br />
.line 1627<br />
.end local v2 #disph:I<br />
.end local v3 #h:I<br />
:cond_2<br />
const/4 v3, 0x0
Click to expand...
Click to collapse
<br />
5. Save your smali file and close.<br />
<br />
<b>Fourth Step :</b><br />
1. Open <font color="Blue">status_bar.xml</font> and find this line :<br />
<com.android.systemui.statusbar.DateView
Click to expand...
Click to collapse
<br />
- Change the this line :<br />
android:background="@drawable/xxxxx"
Click to expand...
Click to collapse
<br />
- To this line :<br />
android:background="@drawable/trans"
Click to expand...
Click to collapse
<br />
- So will look like this :<br />
<com.android.systemui.statusbar.DateView android:background="@drawable/trans"
Click to expand...
Click to collapse
<br />
<br />
2. Save your XML file and Recompile your SystemUI.apk then push it to /system/app<br />
3. Goodluck
Click to expand...
Click to collapse
<br />
<br />
<b>NB :</b><br />
1. you must have a transparant picture and rename it to "trans.png" and move it to "drawable-xxxx" folder. look at below for resolution :<br />
<br />
hdpi : 480x25 pixels<br />
mdpi : 320x25 pixels<br />
ldpi : 240x25 pixel<br />
<br />
<b>Credit :</b><br />
- Jmkl six<br />
- Rizaleon<br />
- Samsung Galaxy Young Official Group Indonesian<br />
- Alien Inside Themer Team<br />
- Tiny Anastasia Development
Click to expand...
Click to collapse
Sent from my GT-I8150 using xda premium

thanks for this useful guide

edit nevermind got it working xD

geva28 said:
thanks for this useful guide
Click to expand...
Click to collapse
your welcome my bro..
SpaceCaker said:
edit nevermind got it working xD
Click to expand...
Click to collapse
what your rom? cm7? if different please tell me.
Send from my fvckin fingers

petrukgrinder said:
your welcome my bro..
what your rom? cm7? if different please tell me.
Send from my fvckin fingers
Click to expand...
Click to collapse
on stock rom
i did this
Remove
Code:
- iget-object v1, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStatusBarView:Lcom/android/systemui/statusbar/StatusBarView;
-
- invoke-virtual {v1}, Lcom/android/systemui/statusbar/StatusBarView;->getHeight()I
-
- move-result v1
-
- sub-int/2addr v0, v1
-
change
Code:
const/16 v3, 0x7de
to
Code:
const/16 v3, 0x7d3
chagne
Code:
const/16 v3, 0x7de
to
Code:
const/16 v3, 0x7d3
remove
Code:
- .line 1388
- iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStatusBarView:Lcom/android/systemui/statusbar/StatusBarView;
-
- invoke-virtual {v8}, Lcom/android/systemui/statusbar/StatusBarView;->getHeight()I
-
- move-result v3
-
Code:
.line 1410
:cond_2
add
Code:
const/4 v3, 0x0
so it looks like this
Code:
.line 1410
:cond_2
const/4 v3, 0x0
const/16 v8, -0x2711
i git diffed my changes to my original systemui and this is the diff
https://github.com/spacecaker/git_status_xp/commit/59a39cd9181cf5241960c105e3d3fb607ce9a59a

Could u send me your .png file responsible for background of clock, date and setting button ?

BlackLie said:
Could u send me your .png file responsible for background of clock, date and settings button ?
Click to expand...
Click to collapse
u can do it by your self with knowledge of photoshop or search any psd files with keywords "emboss style". sorry i can't give your png, cause now i don't using a systemui like that and i forgot where i save it.
Send from my fvckin fingers

petrukgrinder said:
u can do it by your self with knowledge of photoshop or search any psd files with keywords "emboss style". sorry i can't give your png, cause now i don't using a systemui like that and i forgot where i save it.
Send from my fvckin fingers
Click to expand...
Click to collapse
Okey dokey, thanks anyway Your tut is great
---------- Post added at 06:20 PM ---------- Previous post was at 05:59 PM ----------
petrukgrinder said:
u can do it by your self with knowledge of photoshop or search any psd files with keywords "emboss style". sorry i can't give your png, cause now i don't using a systemui like that and i forgot where i save it.
Send from my fvckin fingers
Click to expand...
Click to collapse
Ok, I had made it... which file should I replace ? (I tried trans.png, but it does not work)
Sorry for bothering you ;<

Thank brò ! work on cyanogenmod 7.2 !

BlackLie said:
Could u send me your .png file responsible for background of clock, date and setting button ?
Click to expand...
Click to collapse
how did you get the clock and date above the toggles? i'm trying to do that also, but no luck so far
even when i move the time and date layout all the way to the bottom, it doesn't move

mjz2cool said:
how did you get the clock and date above the toggles? i'm trying to do that also, but no luck so far
even when i move the time and date layout all the way to the bottom, it doesn't move
Click to expand...
Click to collapse
It's not my ss, sorry :<

Related

[How To] Add Customizable 15 Statusbar Toggle Buttons To Samsung Jelly bean Roms

This mod is based on Lidroid work so all credits goes to him, he updated his framework (lidroid-res) to api level 16 but he didn't port it to Samsung Jely bean Roms yet, so i decided to try to do it my self.
{
"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"
}
​
I packaged needed sources into SystemUI, to make it easy to port on next updates.
Let start, you need to decompile SystemUI.apk (use my repacked Apk_Manager if you get any issue).
Edit "SystemUI.apk\res\layout\tw_status_bar_expanded.xml" and make these changes, this will hide the stock status bar and use the new one:
Code:
<include android:layout_width="fill_parent" android:layout_height="@dimen/tw_notification_panel_header_height" layout="@layout/tw_status_bar_expanded_header" />
<com.wanamlite.systemui.quickpanel.PowerWidget android:id="@id/exp_power_stat" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/notification_panel_header_height" />
<HorizontalScrollView android:id="@id/quicksetting_scroller" android:scrollbars="none" android:layout_width="wrap_content" android:layout_height="@dimen/quick_setting_button_height" android:layout_marginTop="@dimen/tw_notification_panel_header_height">
<com.android.systemui.statusbar.policy.quicksetting.QuickSettingPanel android:orientation="horizontal" android:id="@id/quicksetting_container" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:divider="@drawable/tw_black_bg" android:showDividers="middle" />
</HorizontalScrollView>
Edit "SystemUI.apk\res\values\ids.xml" and add this Id:
Code:
++ <item type="id" name="exp_power_stat">false</item>
Edit "SystemUI.apk\smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali" and make these changes :
Add mPowerWidget field :
Code:
.field mPostCollapseCleanup:Ljava/lang/Runnable;
++.field mPowerWidget:Lcom/wanamlite/systemui/quickpanel/PowerWidget;
.field mQueueLock:Ljava/lang/Object;
Method "addIcon" :
Code:
invoke-virtual {v1, v0, p3, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;ILandroid/view/ViewGroup$LayoutParams;)V
.line 1086
++iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/wanamlite/systemui/quickpanel/PowerWidget;
++invoke-virtual {v1}, Lcom/wanamlite/systemui/quickpanel/PowerWidget;->updateWidget()V
return-void
Method "makeStatusBarView" :
Code:
invoke-virtual {v13, v14}, Landroid/widget/ScrollView;->setVerticalScrollBarEnabled(Z)V
++move-object/from16 v0, p0
++iget-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
++const v14, 0x7f0d0109
++invoke-virtual {v13, v14}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
++move-result-object v13
++check-cast v13, Lcom/wanamlite/systemui/quickpanel/PowerWidget;
++move-object/from16 v0, p0
++iput-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/wanamlite/systemui/quickpanel/PowerWidget;
.line 716
new-instance v13, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;
Code:
move-object/from16 v0, p0
iget-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v1, v13, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
++move-object/from16 v0, p0
++iget-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/wanamlite/systemui/quickpanel/PowerWidget;
++invoke-virtual {v13}, Lcom/wanamlite/systemui/quickpanel/PowerWidget;->setupWidget()V
.line 806
sget-boolean v13, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->useTouchWizGUI:Z
Extract attached "wanamlite.zip" and copy both folders "com" & "wanamlite" to your "SystemUI.apk\smali\".
That's all, recompile your SystemUI.
After building, make sure your Id "exp_power_stat" got the public id "0x7f0d0109", if you got a different Id, use your new public Id in the "makeStatusBarView" method.
Download attached "system.zip" , you need to copy Toggle buttons resources "lidroid-res.apk" to "system/framework", and "QuickPanelSettings.apk" to "/system/app" (with permissions 644).
Use this updated guide to mod lidroid-res.
Enjoy!
good job :good:
Awesome
if only there is a flash zip ,will be simpler for non tech like me
Sent from my GT-I9300 using xda app-developers app
noobandroid said:
if only there is a flash zip ,will be simpler for non tech like me
Sent from my GT-I9300 using xda app-developers app
Click to expand...
Click to collapse
Already available on my Rom V3.2.
wanam please can u tell me how to use ur apk manager. as decompiling and compiiling a system app. thanks
wanam said:
Already available on my Rom V3.2.
Click to expand...
Click to collapse
I'm still on 3.1 cause the 3.2 make my phone hang when i flash it, tried couple times
Sent from my GT-I9300 using xda app-developers app
Appreciate your work man, thanks
noobandroid said:
I'm still on 3.1 cause the 3.2 make my phone hang when i flash it, tried couple times
Sent from my GT-I9300 using xda app-developers app
Click to expand...
Click to collapse
Strange...3.2 is perfect here...D/L fail?
Thanks so much Wanam
thanks wanam, systemui.apk upload please.
Thanks a lot again!!!
Sent from my Nexus 7 using Tapatalk 2
Thanks wanam for sharing this.....
Thanks your one of the best
Sent from my GT-I9300 using xda premium
Great work as always,
thank you for sharing this guide with us my friend
Thanks so much Wanam
Which xml edits to remove brightness slider?
Sent from my GT-I9300 using xda premium
rlorange said:
Which xml edits to remove brightness slider?
Sent from my GT-I9300 using xda premium
Click to expand...
Click to collapse
it is located in systemui!
decompile systemui
go to res/layout/tw_status_bar_expanded.xml (open it using notepad++) and scroll down till you see this
PHP:
<LinearLayout android:orientation="vertical" android:id="@id/brightness_controller" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="56.0dip" android:layout_marginTop="@dimen/notification_panel_quicksettingbtn_height">
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" [B]android:visibility="gone"[/B] android:layout_height="55.0dip">
<ImageView android:id="@id/brightness_icon" android:clickable="true" android:layout_width="25.0dip" android:layout_height="fill_parent" android:layout_marginLeft="13.0dip" android:src="@drawable/ic_sysbar_brightness" android:contentDescription="@string/accessibility_brightness_icon" />
<FrameLayout android:id="@id/brightness_group" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/auto_brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
</FrameLayout>
</LinearLayout>
insert the one in the bold letters or (android:visibility="gone") and recompile systemUI!
Thank you Wanam
Thanks great work though 1 request. Can you please add power saving toggle?

[Guide] Jellybean navigation layout for CM7 ROM

About :
This is for make CM7 ROM like Jellybean ROM layout on statusbar.
Credits :
- To Cool
- GDX Team
- DCSMS
- big thanks goes to AChep
Contents :
Post one:
-> Set up
-> Make Clock, date and day
-> Make Network speed on statusbar
-> Customize clear button
Tool used :
-> Apk Tool / Apk Manager / ToolAlite
-> SystemUI.apk
-> Notepad++
Screenshot :
{
"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"
}
Click to expand...
Click to collapse
Guide 1.0 : How To Make Date, Time and Day on Status Bar Expanded
1. you need to decompile your SystemUI.apk (please dont tell me how to do that)
2. extract my jelly.zip.. download on attachment below
3. copy 2 files blablablajellyblablabla.smali to SystemUI.apk/smali/com/android/systemui/statusbar/here
4. now you need to modify status_bar_expanded.xml find on SystemUI.apk/res/layout/here
for first you need to find this line :
Code:
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/carrier_label_layout" android:layout_width="fill_parent" android:layout_height="wrap_content">
paste this code below :
Code:
<com.android.systemui.statusbar.StatusBarJellyHeaderView android:layout_width="wrap_content" android:layout_height="wrap_content" />
5. now recompile your file and push to system/app
=======================================================================================================
Screenshot :
Click to expand...
Click to collapse
Guide 2.0 : How To Create Network Traffic Speed on Status Bar
1. you need to decompile your SystemUI.apk (please dont tell me how to do that)
2. extract my network.zip.. download on attachment below
3. copy folder smali to SystemUI.apk/here
4. now you need to modify status_bar.xml find on SystemUI.apk/res/layout/here
for first you need to find this line :
Code:
<com.android.systemui.statusbar.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:paddingLeft="6.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentLeft="true" />
paste this code below :
Code:
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true">
<in.jmkl.dcsms.statusbargreper.DataTrafik android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
5. now recompile your file and push to system/app
=======================================================================================================
Screenshot :
Click to expand...
Click to collapse
Guide 3.0 : How To Make Customization Your Clear Button
1. you need to decompile your SystemUI.apk (please dont tell me how to do that)
2. extract my clearbutton.zip.. download on attachment below
3. copy 3 files to drawable-xxxx (xxxx is by your phone, mdpi, hdpi, ldpi or xhdpi)
4. now you need to modify xxx.xml (create by your self), styles.xml, status_bar_expanded.xml
for first you need to create clear_button.xml on drawable folder and copy this line to your xml file :
Code:
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/btn_clear_focus" />
<item android:state_window_focused="false" android:state_enabled="false" android:drawable="@drawable/btn_clear" />
<item android:state_pressed="true" android:drawable="@drawable/btn_clear_pressed" />
<item android:state_focused="true" android:state_enabled="true" android:drawable="@drawable/btn_clear_focus" />
<item android:state_enabled="true" android:drawable="@drawable/btn_clear_focus" />
<item android:state_focused="true" android:drawable="@drawable/btn_clear_focus" />
<item android:drawable="@drawable/btn_clear_focus" />
</selector>
now, open the styles.xml on SystemUI.apk/res/values/here and copy this line in the end before </resources> line :
Code:
<style name="Awesome.Button" parent="@android:style/Widget.Button">
<item name="android:textAppearance">?android:textAppearanceSmallInverse</item>
<item name="android:textColor">#ffffffff</item>
<item name="android:gravity">center</item>
<item name="android:background">@drawable/clear_button</item>
<item name="android:focusable">true</item>
<item name="android:clickable">true</item>
</style>
note : this line on red colors is pointed to your new xml file
Code:
<item name="android:background">@drawable/[COLOR="Red"]clear_button[/COLOR]</item>
now, open the status_bar_expanded.xml on SystemUI.apk/res/layout/here and find this line :
Code:
<TextView android:layout_gravity="center_vertical" android:id="@id/clear_all_button"
modify the line styles or paste my line like this :
Code:
<TextView android:layout_gravity="center_vertical" android:id="@id/clear_all_button" android:paddingLeft="15.0dip" android:paddingRight="15.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="4.0dip" android:layout_marginBottom="1.0dip" android:text="@string/status_bar_clear_all_button" style="@style/Awesome.Button" />
5. now recompile your file and push to system/app
Guide 4.0 : How to add settings button on Status Bar Expdanded
1. you need to decompile SystemUI.apk (please dont tell me how to do that)
2. download my zip from here and extract it
3. now you must modify status_bar_expanded.xml
for first you need to find this line :
Code:
<com.android.systemui.statusbar.CarrierLabel android:textSize="17.659973dip" android:textColor="#ffffffff android:layout_gravity="center_vertical" android:orientation="vertical" android:paddingBottom="1.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="5.0dip" android:layout_marginTop="1.0dip" android:layout_weight="1.0" />
after that line, add this line :
Code:
<ImageView android:layout_gravity="center_vertical" android:id="@id/settings_button" android:paddingLeft="0.0dip" android:paddingTop="0.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:contentDescription="@string/accessibility_settings_button" />
now, you must open string.xml and add this line on bottom :
Code:
<string name="accessibility_settings_button">System settings.</string>
open ids.xml and add this line on bottom :
Code:
<item type="id" name="settings_button">false</item>
now, you must extract settingsshortcut.zip.. extract to your decompiled folder and then compile your SystemUI.apk this is for got public id number.. so after compiled, you must decompile again.
open public.xml and StatusBarService.smali. Find this line on public.xml :
Code:
<public type="id" name="settings_button" id="[COLOR="Red"]0x7f090027[/COLOR]" />
the red color may be different
find this line on StatusBarService.smali :
Code:
.field mScrollView:Landroid/widget/ScrollView
and then add this line below :
Code:
.field mSettingsBut:Landroid/view/View;
.field private mSettingsButListener:Landroid/view/View$. OnClickListener;
now, find this line :
Code:
iput-object v0, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStopTracing:Ljava/lang/Runnable;
and then add this line below :
Code:
.line 1703
new-instance v0, Lcom/android/systemui/statusbar/StatusBarService$8;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/StatusBarService$8;-><init>
(Lcom/android/systemui/statusbar/StatusBarService;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsButListener:Landroid/view/View $OnClickListener;
return-void.
find this line again :
Code:
iput v7, p0, Lcom/android/systemui/statusbar/StatusBarService;->mEdgeBorder:I
If not find, change v7 to v8
and then add this line below :
Code:
.line 333
const v7, [COLOR="Red"]0x7f090027[/COLOR]
invoke-virtual {v1, v7}, Lcom/android/systemui/statusba/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v7
iput-object v7, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsBut:Landroid/view/View;
.line 334
iget-object v7, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsBut:Landroid/view/View;
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsButListener:Landroid/view/View $OnClickListener;
invoke-virtual {v7, v8}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
*for the red color on .line 333 you must change to your settings_button on your public.xml
*if your find iput v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mEdgeBorder:I so v7 change to v8. and the line will be like this :
Code:
.line 333
const v8, 0x7f090029
invoke-virtual {v2, v8}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v8
iput-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsBut:Landroid/view/View;
.line 334
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsBut:Landroid/view/View;
iget-object v9, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsButListener:Landroid/view/View $OnClickListener;
invoke-virtual {v8, v9}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
now, copy StatusBarService$8.smali to SystemUI.apk/smali/com/android/systemui/statusbar/here after that compile and push to system/app.
================================================== ================================================== ===
Guide 5.0 : How to add carrier label on statusbar close on
1. you need to decompile SystemUI.apk (please dont tell me how to do that)
2. now you must modify status_bar_tracking.xml
for first you need to find this line :
Code:
<com.android.systemui.statusbar.CloseDragHandle
and then paste this line below :
Code:
<com.android.systemui.statusbar.CarrierLabel android:textSize="17.659973dip" android:textColor="#ffffffff" android:gravity="center_horizontal" android:paddingBottom="1.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="1.0dip" />
re-compile and push to system/app
for update
Nice tutorial
thanks
ariadelvana95 said:
Nice tutorial
thanks
Click to expand...
Click to collapse
with my pleasure..
I would spam your thanks button if you do this status bar for latest minicm7 2.2.1
Sent from my E15i using xda app-developers app
mantap !!! nice tutorial ! i've been searching for this tutorial and now i found it
what cm7 theme your using can u share?
heheh, that's my jelly bean statusbar
Where have I gone wrong?? Clear text is also displayed along with the image.
Have attached SystemUI.apk after doing all the mods (except network thing)
-------------------EDIT-----------------------------------
solved. Had to edit strings.xml
Now the problem is the clear button won't stay at the right corner. Screenshot attached..
Nice..
I like your guide..
Sent from my GT-S5660 using Tapatalk 2
CWM or AROMA installer???
Mobil cihazdan gönderildi..
aOS 2.3.6 BNC-GIO-R2
MMB-Tweaks_0.9_Fix
m.ali.ozkaya said:
CWM or AROMA installer???
Mobil cihazdan gönderildi..
aOS 2.3.6 BNC-GIO-R2
MMB-Tweaks_0.9_Fix
Click to expand...
Click to collapse
What is the point of your question??
:what:
Sent from my GT-S5660 using Tapatalk 2
Thanks man! nice guide
Next.....!
Guide 4.0 : How To Make Customization Your Setting Button ^0^
---------- Post added at 02:49 AM ---------- Previous post was at 02:47 AM ----------
Xr01d_GT said:
solved. Had to edit strings.xml
Now the problem is the clear button won't stay at the right corner. Screenshot attached..
Click to expand...
Click to collapse
how to edit strings.xml?
thanks
Doesn't work for me unfortunately. CM7 on LG P990. No status bar.
Xr01d_GT said:
Where have I gone wrong?? Clear text is also displayed along with the image.
Have attached SystemUI.apk after doing all the mods (except network thing)
-------------------EDIT-----------------------------------
solved. Had to edit strings.xml
Now the problem is the clear button won't stay at the right corner. Screenshot attached..
Click to expand...
Click to collapse
sorry mate I late for reply just have low connection on Indonesia.. for make dissapear "clear" text on clear button you need to edit string.xml
so, this is guide for it..
Open your string.xml on SystemUI.apk/res/values/here and find this line :
Code:
<string name="blablabla_clear_button">Clear</string>
now, you must modify the syntact like this :
Code:
<string name="blablabla_clear_button"/string>
do the same if you want dissapear the text for Notifications, On Going, No Notifications
Imperticus said:
Doesn't work for me unfortunately. CM7 on LG P990. No status bar.
Click to expand...
Click to collapse
please attach your logcat mate, maybe i can help you
x-dira said:
Thanks man! nice guide
Next.....!
Guide 4.0 : How To Make Customization Your Setting Button ^0^
---------- Post added at 02:49 AM ---------- Previous post was at 02:47 AM ----------
how to edit strings.xml?
thanks
Click to expand...
Click to collapse
Yes i will add this guide, but not now.. so wait for my guide updates..
m.ali.ozkaya said:
CWM or AROMA installer???
Mobil cihazdan gönderildi..
aOS 2.3.6 BNC-GIO-R2
MMB-Tweaks_0.9_Fix
Click to expand...
Click to collapse
This is mod guide, so you can modding systemui.apk by your self.. not flasable.zip
AiphNday said:
Nice..
I like your guide..
Sent from my GT-S5660 using Tapatalk 2
Click to expand...
Click to collapse
thanks mate will update if i not busy
Mockingbird said:
I would spam your thanks button if you do this status bar for latest minicm7 2.2.1
Sent from my E15i using xda app-developers app
Click to expand...
Click to collapse
just attach your systemui.apk
saldymhmd said:
mantap !!! nice tutorial ! i've been searching for this tutorial and now i found it
Click to expand...
Click to collapse
haha.. sama2 master
english : haha.. your welcome master
dredremon said:
what cm7 theme your using can u share?
Click to expand...
Click to collapse
i use my own rom.. not a theme
AChep said:
heheh, that's my jelly bean statusbar
Click to expand...
Click to collapse
yes mate.. hey everyone give thanks to AChep his owner of jelly layout date, time and day.. on updates i will add your name on OP post.. sorry i forget that.. i just remember you're a part of ginger dx team
Got it to work now
petrukgrinder said:
just attach your systemui.apk
Click to expand...
Click to collapse
Can u share systemui.apk
thanks

How to Port Lidroid Toggles to non Samsung ICS 4.0 roms

HOW TO PORT LIDROID TOGGLES
TO NON SAMSUNG ICS ROMS
for JB you can go here : http://forum.xda-developers.com/showthread.php?t=2381290
Credit & Thank you :
- @lidroid
- Recognized themer @serajr for some additional toggles created by him.
and we are going to port 21 Lidroid toggles :
( -Lock screen/screen-off action, -Reboot action, -Shutdown action, -Airplane mode, -Bluetoth, -Brightness, -GPS, -Flashlight, -Lockscreen, -MobileData, -Orientation, -ScreenTimeOut, -Sound, -Sync, -Wi-fi, -Wi-fi Hotspot, Battery info, Stay awake, USB Connection mode, USB Debugging, Network mode )
NOTE !! , for CyanogenMod 9 do not follow this guide, you can just flash my mod for CM9 in here http://forum.xda-developers.com/showthread.php?t=2334200
many users from different devices reported work on their phone
ok lets go to Guide:
first of all need some requirement for this MOD-GUIDE
REQUIREMENT:
- BRAIN
- Patient
- experience
- Know how to decompile/recompiling Apk file
- notepad++
- Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools/ or else
1. Decomple SystemUI.apk
- res/values/ids.xml
add this to the end :
Code:
<item type="id" name="quickpanel_button">false</item>
<item type="id" name="quickpanel_button_image">false</item>
<item type="id" name="quickpanel_button_text">false</item>
<item type="id" name="quickpanel_button_indic">false</item>
<item type="id" name="adi_quickpanel">false</item>
- res/values/strings.xml
add this to the end :
Code:
<string name="quickpanel_wifi_text">WiFi</string>
<string name="quickpanel_dc_text">Data</string>
<string name="quickpanel_network_mode_text">Network</string>
<string name="quickpanel_sound_text">Ring</string>
<string name="quickpanel_sound_vibration_text">Ring Vibrate</string>
<string name="quickpanel_silent_text">Silent</string>
<string name="quickpanel_vibration_text">Vibration</string>
<string name="quickpanel_rotation_text">Orientation</string>
<string name="quickpanel_bluetooth_text">Bluetooth</string>
<string name="quickpanel_gps_text">GPS</string>
<string name="quickpanel_autosync_text">Auto Sync</string>
<string name="quickpanel_brightness_text">Brightness</string>
<string name="quickpanel_screen_timeout_text">Timeout</string>
<string name="quickpanel_lockscreen_text">Lockscreen</string>
<string name="quickpanel_airplane_text">Airplane</string>
<string name="quickpanel_flashlight_text">Flashlight</string>
<string name="quickpanel_reboot_text">Reboot</string>
<string name="quickpanel_shutdown_text">Shutdown</string>
<string name="airplane_mode">In Flight mode</string>
<string name="shutdown_confirm">Your phone will shut down.</string>
<string name="screen_timeout_seconds">Screen timeout set to: %d second(s)</string>
<string name="screen_timeout_minutes">Screen timeout set to: %d minute(s)</string>
<string name="screen_timeout_hours">Screen timeout set to: %d hour(s)</string>
<string name="hamster">Phone Options</string>
<string name="yes">OK</string>
<string name="no">Cancel</string>
<string name="reboot">Reboot</string>
<string name="reboot_recovery">CWM recovery</string>
<string name="reboot_download">Download</string>
<string name="quickpanel_usb_debugging_text">USB Debugging</string>
<string name="quickpanel_usb_connection_mode_text">USB Conn. Mode</string>
<string name="quickpanel_usb_current_mtp_title">Current mode: MPT</string>
<string name="quickpanel_usb_current_msc_title">Current mode: MSC</string>
<string name="usb_mpt_mode">MPT - Media Transfer</string>
<string name="usb_msc_mode">MSC - Mass Storage</string>
<string name="quickpanel_stay_awake_plugged_text">Stay Awake</string>
<string name="quickpanel_battery_info_text">Battery Info</string>
<string name="battery_info_info">Battery Information</string>
<string name="battery_info_usage">Battery Power Usage</string>
<string name="quickpanel_wifi_ap_text">Wifi AP</string>
<string name="quickpanel_lockscreen_action_text">Lock Now</string>
- res/layout/status_bar_expanded.xml
add the red code :
MEDIATEK device
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.ExpandedView android:orientation="vertical" 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">
<FrameLayout android:id="@id/toolBarSwitchPanel" android:background="@drawable/notification_header_bg" android:layout_width="fill_parent" android:layout_height="103.0dip">
<include layout="@layout/zzz_toolbar_view" />
<include layout="@layout/zzz_toolbar_indicator" />
</FrameLayout>
<View android:background="@drawable/status_bar_hr" android:layout_width="fill_parent" android:layout_height="2.0dip" />
<RelativeLayout android:background="@drawable/notification_header_bg" android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="52.0dip">
<com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Date" android:gravity="left|center" android:id="@id/date" android:paddingLeft="16.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_alignParentLeft="true" />
<ImageView android:id="@id/settings_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:layout_toRightOf="@id/date" android:contentDescription="@string/accessibility_settings_button" />
<ImageView android:id="@id/clear_all_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_clear" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
</RelativeLayout>
[COLOR="Red"]<com.lidroid.systemui.quickpanel.PowerWidget android:id="@id/adi_quickpanel" android:layout_width="fill_parent" android:layout_height="wrap_content" />[/COLOR]
<View android:background="@drawable/status_bar_hr" android:layout_width="fill_parent" android:layout_height="2.0dip" />
<FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
<TextView android:textAppearance="@*android:style/TextAppearance.Large" android:gravity="left" android:layout_gravity="top" android:id="@id/noNotificationsTitle" android:padding="8.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_no_notifications_title" />
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:overScrollMode="ifContentScrolls">
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_height" />
</LinearLayout>
</ScrollView>
<ImageView android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/title_bar_shadow" android:scaleType="fitXY" />
</FrameLayout>
</com.android.systemui.statusbar.phone.ExpandedView>
AOSP / XPERIA
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.ExpandedView android:orientation="vertical" 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">
<RelativeLayout android:background="@drawable/notification_header_bg" android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="52.0dip">
<com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Date" android:gravity="left|center" android:id="@id/date" android:paddingLeft="16.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_alignParentLeft="true" />
<ImageView android:id="@id/settings_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:layout_toRightOf="@id/date" android:contentDescription="@string/accessibility_settings_button" />
<ImageView android:id="@id/clear_all_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_clear" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
</RelativeLayout>
[COLOR="Red"]<com.lidroid.systemui.quickpanel.PowerWidget android:id="@id/adi_quickpanel" android:layout_width="fill_parent" android:layout_height="wrap_content" />[/COLOR]
<View android:background="@drawable/status_bar_hr" android:layout_width="fill_parent" android:layout_height="2.0dip" />
<FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
<TextView android:textAppearance="@*android:style/TextAppearance.Large" android:gravity="left" android:layout_gravity="top" android:id="@id/noNotificationsTitle" android:padding="8.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_no_notifications_title" />
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:overScrollMode="ifContentScrolls">
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_height" />
</LinearLayout>
</ScrollView>
<ImageView android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/title_bar_shadow" android:scaleType="fitXY" />
</FrameLayout>
</com.android.systemui.statusbar.phone.ExpandedView>
- smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
add the blue code :
Code:
.field mPixelFormat:I
.field mPositionTmp:[I
.field mPostCollapseCleanup:Ljava/lang/Runnable;
[COLOR="Blue"].field mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;[/COLOR]
.field private mPreviousConfigFontScale:F
.field mQueueLock:Ljava/lang/Object;
.field private mRecentTasksLoader:Lcom/android/systemui/recent/RecentTasksLoader;
NEXT still in the same smali
for MEDIATEK devices
find this method
Code:
# virtual methods
.method public addIcon(Ljava/lang/String;IILcom/android/internal/statusbar/StatusBarIcon;)V
scroll down and add the blue code
Code:
invoke-virtual {v1, v0, p3, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;ILandroid/view/ViewGroup$LayoutParams;)V
[COLOR="Blue"]iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v1}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->updateWidget()V[/COLOR]
.line 601
return-void
.end method
next find this method :
Code:
.method protected makeStatusBarView()Landroid/view/View;
scroll down and add the blue code
Code:
const [COLOR="Red"]v11[/COLOR], 0x7f0e0041
invoke-virtual {[COLOR="Red"]v2, v11[/COLOR]}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object [COLOR="Red"]v11[/COLOR]
check-cast [COLOR="Red"]v11[/COLOR], Landroid/widget/ScrollView;
iput-object [COLOR="Red"]v11, p0[/COLOR], Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
[COLOR="Blue"]const [COLOR="Red"]v11[/COLOR], 0x7f0e0096
invoke-virtual {[COLOR="Red"]v2, v11[/COLOR]}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object [COLOR="Red"]v11[/COLOR]
check-cast [COLOR="Red"]v11[/COLOR], Lcom/lidroid/systemui/quickpanel/PowerWidget;
iput-object [COLOR="Red"]v11, p0[/COLOR], Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;[/COLOR]
.line 375
new-instance v11, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;
invoke-direct {v11, p0, v1, v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/content/Context;Landroid/view/View;)V
iput-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTicker:Lcom/android/systemui/statusbar/phone/Ticker;
pay attention on the red code in the part of blue code, it has to be written the same like above it/previous part
and also every mediatek device may be have diferent code,. see my another example in here : http://forum.xda-developers.com/showpost.php?p=44095535&postcount=7
next still in the same method, scroll down , and add the blue code
Code:
const-string v11, "android.intent.action.SIM_INFO_UPDATE"
invoke-virtual {v9, v11}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 450
iget-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSIMInfoReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v1, v11, v9}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
[COLOR="Blue"]iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v1}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V[/COLOR]
.line 454
return-object v6
.line 312
.end local v3 #filter:Landroid/content/IntentFilter;
.end local v4 #indicator:Lcom/android/systemui/statusbar/toolbar/ToolBarIndicator;
.end local v6 #sb:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.end local v8 #signalCluster:Lcom/android/systemui/statusbar/SignalClusterViewGemini;
.end local v9 #simInfoIntentFilter:Landroid/content/IntentFilter;
.end local v10 #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;
Click to expand...
Click to collapse
for AOSP / XPERIA
find this method
Code:
# virtual methods
.method public addIcon(Ljava/lang/String;IILcom/android/internal/statusbar/StatusBarIcon;)V
scroll down and add the blue code
Code:
const-string v8, "android.intent.action.SCREEN_OFF"
invoke-virtual {v2, v8}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 373
iget-object v8, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v0, v8, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
[COLOR="Blue"]iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;
const v6, 0x7f0e0096
invoke-virtual {v5, v6}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v5
check-cast v5, Lcom/lidroid/systemui/quickpanel/PowerWidget;
iput-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v6}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V[/COLOR]
.line 375
return-object v4
.line 306
.end local v2 #filter:Landroid/content/IntentFilter;
.end local v6 #signalCluster:Lcom/android/systemui/statusbar/SignalClusterView;
.end local v7 #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;
:catch_0
move-exception v8
goto/16 :goto_0
.end method
Click to expand...
Click to collapse
CONTINUE TO POST #2
2. Download source_ICS_Lidroid_SytemUI.apk
Exstract it and merge to your decompiled SystemUI.apk
NOTE !! if your device has arrays.xml in res/values/here
please do check again the source_ICS_Lidroid_SytemUI.apk and adapt the arrays.xml code in it with yours
done and Recompile your SystemUI.apk
3. Decompile the newly Recompiled APK again and go to
res/values/public.xml
open it with Notepad++
leave it, but keep it open
next
- smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
with Notepad++ , control+F
MEDIATEK DEVICES
Code:
iput-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
const v11, [COLOR="Red"]0x7f0e0096[/COLOR]
invoke-virtual {v2, v11}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v11
check-cast v11, Lcom/lidroid/systemui/quickpanel/PowerWidget;
iput-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
.line 375
new-instance v11, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;
Click to expand...
Click to collapse
AOSP/XPERIA
Code:
invoke-virtual {v0, v8, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;
const v6, [COLOR="Red"]0x7f0e0096[/COLOR]
invoke-virtual {v5, v6}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v5
check-cast v5, Lcom/lidroid/systemui/quickpanel/PowerWidget;
iput-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v6}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V
.line 375
return-object v4
Click to expand...
Click to collapse
Replace 0x7f0e0096 with the new ids from second decompiled public.xml
Code:
<public type="id" name="[COLOR="Blue"]adi_quickpanel[/COLOR]" id="[COLOR="Red"]0x7fxxxxxx[/COLOR]" />
NEXT CONTINUE IN POST #3
4. Download ICS_Lidroid_public.xml
and open it with Notepad++
so now you have two public.xml which is opened in the Notepad++
1. second decompiled public.xml
2. ICS_Lidroid_public.xml
- go to , smali/com/lidroid/systemui/quickpanel/here...
there are a lot of smalis there
FIND ALL IDS in all that smalis THAT'S STARTED WITH
Code:
[COLOR="Red"]0x7fxxxxxx[/COLOR]
EXAMPLE :
AirplaneButton.smali
find this :
Code:
const v0, [COLOR="Red"]0x7f080089[/COLOR]
find 0x7f080089 in ICS_Lidroid_public.xml
Code:
<public type="string" name="quickpanel_lockscreen_text" id="0x7f080088" />
<public type="[COLOR="Blue"]string[/COLOR]" name="[COLOR="Green"]quickpanel_airplane_text[/COLOR]" id="[COLOR="Red"]0x7f080089[/COLOR]" />
<public type="string" name="quickpanel_flashlight_text" id="0x7f08008a" />
we find that 0x7f080089 is for string .... quickpanel_airplane_text
Next, find string .... quickpanel_airplane_text new ids in your
public.xml of second decompiled SystemUI.apk
Code:
<public type="[COLOR="Blue"]string[/COLOR]" name="[COLOR="Green"]quickpanel_airplane_text[/COLOR]" id="[COLOR="Red"]0x7fxxxxxx[/COLOR]" />
change the ids in AirplaneButton.smali with your new ids from public.xml of second decompiled systemui.apk.
Do it too, to all
Code:
[COLOR="Red"]0x7fxxxxxx[/COLOR]
in all smalis in the lidroid folder.
6. Download this QuickPanel_Settings.apk and push to system/app with right permission
Done
Additional Guide
[HOWTO] Enable 2G/3G, 2G, 3G Toggle
only for devices that support 3G/HSDPA
Go to this thread [HOWTO] Enable 2G/3G Toggle from Statusbar/Launcher
But don't follow the lidroid step, coz we have it already
or Without patching Phone.apk , but with editing Lidroid and Android.manifest
go here : http://forum.xda-developers.com/showpost.php?p=40971646&postcount=30
[Porting Guide][ICS] Mod 4.2 Statusbar tilesview (TABS, Slider, Flip Anim, Lidroid )
http://forum.xda-developers.com/showthread.php?t=2423398
Guide How to full screen Expanded Pulldown JB style
http://forum.xda-developers.com/showthread.php?p=45130177#post45130177
I think that should be done before step 2 because I have the error code in PhoneStatusBar.smali 0x7f0e0096 in step 1
{
"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"
}
I made 2 previous steps then get the code received from <public type="id" name="adi_quickpanel" id="0x7fxxxxxx" /> instead PhoneStatusBar.smali then recompile and it's ok
My device is Lenovo A390
Sorry for my bad English!
Gửi từ Lenovo A390_ROW của tôi bằng cách sử dụng Tapatalk 2
I get errors while recompiling the apk. Here's the full error http://pastebin.com/EKEVsGQh. I'm attaching my SystemUI and framework-res for reference. Please do not just mod it and give it to me, explain if you can so I can know what exactly is the problem
SystemUI.apk
framework-res.apk
try this @grvrulz
add the blue code, but don't add <-- adi_quickpanel
Code:
[COLOR="Red"]const v13, 0x7f0e0042
invoke-virtual {v3, v13}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v13
check-cast v13, Landroid/widget/ScrollView;
move-object/from16 v0, p0
iput-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;[/COLOR]
[B]blue lines below is basically a copy from above red lines[/B]
[COLOR="Blue"]const v13, 0x7f0e0042 <-- adi_quickpanel
invoke-virtual {v3, v13}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v13
check-cast v13, Lcom/lidroid/systemui/quickpanel/PowerWidget;
move-object/from16 v0, p0
iput-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;[/COLOR]
dafuqChicken said:
I think that should be done before step 2 because I have the error code in PhoneStatusBar.smali 0x7f0e0096 in step 1
View attachment 2152085
I made 2 previous steps then get the code received from <public type="id" name="adi_quickpanel" id="0x7fxxxxxx" /> instead PhoneStatusBar.smali then recompile and it's ok
View attachment 2152086
My device is Lenovo A390
Sorry for my bad English!
Gửi từ Lenovo A390_ROW của tôi bằng cách sử dụng Tapatalk 2
Click to expand...
Click to collapse
oke , how is the result now ?, is there any I can help
How to Port Lidroid Toggles to CM7
Thanks
x-dira said:
How to Port Lidroid Toggles to CM7
Thanks
Click to expand...
Click to collapse
I cannot experimenting on CM7 , coz we don't have CM7 roms on my device,.
but CM7 is Gingerbread, so I think it will be same guide like for Stok GB too
Still doesn't work
Adi Aisiteru Reborn said:
try this @grvrulz
add the blue code, but don't add <-- adi_quickpanel
Code:
[COLOR="Red"]const v13, 0x7f0e0042
invoke-virtual {v3, v13}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v13
check-cast v13, Landroid/widget/ScrollView;
move-object/from16 v0, p0
iput-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;[/COLOR]
[B]below is a copied from above[/B]
[COLOR="Blue"]const v13, 0x7f0e0042 <-- adi_quickpanel
invoke-virtual {v3, v13}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v13
check-cast v13, Lcom/lidroid/systemui/quickpanel/PowerWidget;
move-object/from16 v0, p0
iput-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;[/COLOR]
Click to expand...
Click to collapse
Thank you. I completed the whole guide with this, but the quickpanel doesn't show up. I tried rebooting a couple of times and placing the quickpanel widget at different points in the layout, but it still doesn't show up. I took a logcat with 'adb logcat -d > logcat2.txt' and I'm attaching it here for reference.
Yeah! I have done!!
Thank you for this mod!
Can you help me remove it?
Gửi từ Lenovo A390_ROW của tôi bằng cách sử dụng Tapatalk 2
grvrulz said:
Thank you. I completed the whole guide with this, but the quickpanel doesn't show up. I tried rebooting a couple of times and placing the quickpanel widget at different points in the layout, but it still doesn't show up. I took a logcat with 'adb logcat -d > logcat2.txt' and I'm attaching it here for reference.
Click to expand...
Click to collapse
can you attach me your modded PhoneStatusBar.smali ?
dafuqChicken said:
Can you help me remove it?
View attachment 2153404
Gửi từ Lenovo A390_ROW của tôi bằng cách sử dụng Tapatalk 2
Click to expand...
Click to collapse
Code:
android:layout_height="[COLOR="Red"]0.0dip[/COLOR]"
Adi Aisiteru Reborn said:
Additional Guide
[HOWTO] Enable 2G/3G, 2G, 3G Toggle
only for devices that support 3G/HSDPA
Go to this thread [HOWTO] Enable 2G/3G Toggle from Statusbar/Launcher
But don't follow the lidroid step, coz we have it already
or Without patching Phone.apk , but with editing Lidroid and Android.manifest
go here : http://forum.xda-developers.com/showpost.php?p=40971646&postcount=30
Click to expand...
Click to collapse
Additional Guide added
Adi Aisiteru Reborn said:
can you attach me your modded PhoneStatusBar.smali ?
Click to expand...
Click to collapse
Here's my Phonestatusbar.smali. It's renamed because xda doesn't accept smali files as attachments(but you probably knew it already )
grvrulz said:
Here's my Phonestatusbar.smali. It's renamed because xda doesn't accept smali files as attachments(but you probably knew it already )
Click to expand...
Click to collapse
Code:
const-string v13, "file"
invoke-virtual {v6, v13}, Landroid/content/IntentFilter;->addDataScheme(Ljava/lang/String;)V
.line 473
move-object/from16 v0, p0
iget-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mMediaEjectBroadcastReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v2, v13, v6}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
[COLOR="Blue"]iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v1}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V[/COLOR]
.line 475
return-object v8
.line 320
.end local v4 #filter:Landroid/content/IntentFilter;
.end local v5 #indicator:Lcom/android/systemui/statusbar/toolbar/ToolBarIndicator;
.end local v6 #mediaEjectFilter:Landroid/content/IntentFilter;
.end local v8 #sb:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.end local v10 #signalCluster:Lcom/android/systemui/statusbar/SignalClusterViewGemini;
.end local v11 #simInfoIntentFilter:Landroid/content/IntentFilter;
.end local v12 #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;
:cond_1
const v13, 0x7f030020
const/4 v14, 0x0
invoke-static {v2, v13, v14}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v8
check-cast v8, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.restart local v8 #sb:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
goto/16 :goto_0
.line 337
:catch_0
move-exception v13
goto/16 :goto_1
.end method
you havn't add the blue code
Adi Aisiteru Reborn said:
Code:
const-string v13, "file"
invoke-virtual {v6, v13}, Landroid/content/IntentFilter;->addDataScheme(Ljava/lang/String;)V
.line 473
move-object/from16 v0, p0
iget-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mMediaEjectBroadcastReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v2, v13, v6}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
[COLOR="Blue"]iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v1}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V[/COLOR]
.line 475
return-object v8
.line 320
.end local v4 #filter:Landroid/content/IntentFilter;
.end local v5 #indicator:Lcom/android/systemui/statusbar/toolbar/ToolBarIndicator;
.end local v6 #mediaEjectFilter:Landroid/content/IntentFilter;
.end local v8 #sb:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.end local v10 #signalCluster:Lcom/android/systemui/statusbar/SignalClusterViewGemini;
.end local v11 #simInfoIntentFilter:Landroid/content/IntentFilter;
.end local v12 #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;
:cond_1
const v13, 0x7f030020
const/4 v14, 0x0
invoke-static {v2, v13, v14}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v8
check-cast v8, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.restart local v8 #sb:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
goto/16 :goto_0
.line 337
:catch_0
move-exception v13
goto/16 :goto_1
.end method
you havn't add the blue code
Click to expand...
Click to collapse
After adding this, I get the error
Code:
[8180,1] The register number must be less than v16
I also tried adding
Code:
move-object/from16 v0, p0
just before that line but it's still the same..
grvrulz said:
After adding this, I get the error
Code:
[8180,1] The register number must be less than v16
I also tried adding
Code:
move-object/from16 v0, p0
just before that line but it's still the same..
Click to expand...
Click to collapse
try to use PhoneStatusBar.smali code for AOSP/XPERIA from OP,.
or for Touchwizz in here http://forum.xda-developers.com/showthread.php?t=1725411
but change
Code:
Lcom/wanam/systemui/quickpanel/PowerWidget;
to :
Code:
Lcom/lidroid/systemui/quickpanel/PowerWidget;

[MOD][GUIDE] 4.2 LockScreen Clock for 4.0+

after reading many ICS+ users requests, they want 4.2 lock screen clock.. here it is
{
"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"
}
Things Needed:
* smali & baksmali
* Text Editor
* Your device framework.jar
Step 1 : in lockscreen digital clock, there are actually 2 clock views overlapping one another...
java source :
Code:
CharSequence newTime = DateFormat.format(mFormat, mCalendar);
mTimeDisplayBackground.setText(newTime);
mTimeDisplayForeground.setText(newTime);
mAmPm.setIsMorning(mCalendar.get(Calendar.AM_PM) == 0);
and
Code:
private static final String SYSTEM_FONT_TIME_BACKGROUND = SYSTEM + "AndroidClock.ttf";
private static final String SYSTEM_FONT_TIME_FOREGROUND = SYSTEM + "AndroidClock_Highlight.ttf";
so we just have to use both views to get what we wanted, to do so follow steps,
decompile framework.jar goto : com\android\internal\widget\ , open DigitalClock.smali with a text editor..
search for :
Code:
Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
you will see these lines :
Code:
iget-object v2, p0, Lcom/android/internal/widget/DigitalClock;->mTimeDisplayBackground:Landroid/widget/TextView;
invoke-virtual {v2, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
iget-object v2, p0, Lcom/android/internal/widget/DigitalClock;->mTimeDisplayForeground:Landroid/widget/TextView;
invoke-virtual {v2, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
Step 2: below this,
Code:
iget-object v2, p0, Lcom/android/internal/widget/DigitalClock;->mTimeDisplayBackground:Landroid/widget/TextView;
invoke-virtual {v2, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
add these lines :
Code:
new-instance v2, Ljava/text/SimpleDateFormat;
const-string v3, "h"
sget-object v4, Ljava/util/Locale;->ENGLISH:Ljava/util/Locale;
invoke-direct {v2, v3, v4}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V
iget-object v3, p0, Lcom/android/internal/widget/DigitalClock;->mCalendar:Ljava/util/Calendar;
invoke-virtual {v3}, Ljava/util/Calendar;->getTime()Ljava/util/Date;
move-result-object v3
invoke-virtual {v2, v3}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
move-result-object v1
so now we just used second clock view which is add to android at API level 11 (Honeycomb).. but not used after ICS...
Step 3 : last step, by default as i said second clock view visibility is turned off
java source :
Code:
mTimeDisplayBackground = (TextView) findViewById(R.id.timeDisplayBackground);
mTimeDisplayBackground.setTypeface(sBackgroundFont);
mTimeDisplayBackground.setVisibility(View.[COLOR="Red"]INVISIBLE[/COLOR]);
to do so delete this line :
Code:
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V
Step 4 : download font in attachments push them to system\fonts\
Step 5 : Save all changes and compile flash/push/do whateva
for those who want to know what is happening study modified AOSP DigitalClock source in attachment (unmodified),
Credits :
* Android for source
* jesusfreke for smali & baksmali Tools
can u plz... provide this mod for micromax a110
arjunsharma said:
can u plz... provide this mod for micromax a110
Click to expand...
Click to collapse
ask any dev in a110 fourms... @BOND1987 @Akhilendra1711 or @khan_frd2002 can do this for you... its easy....
akash akya said:
ask any dev in a110 fourms... @BOND1987 @Akhilendra1711 or @khan_frd2002 can do this for you... its easy....
Click to expand...
Click to collapse
@akash akya I will do after competing the 4.2 Quick panel
after this mod the lockscreen handle goes below its original position
is there any way to get it back to its original position???
Help would be appreciated
Cute Idiot said:
after this mod the lockscreen handle goes below its original position
is there any way to get it back to its original position???
Help would be appreciated
Click to expand...
Click to collapse
lol, nope... it remain untouched...
Can you please tell me what went wrong?
Here's mine. Seems like the 2 fonts overlapped with each other.
joeyhuab said:
Here's mine. Seems like the 2 fonts overlapped with each other.
Click to expand...
Click to collapse
bro you surly missed here :
Code:
new-instance v2, Ljava/text/SimpleDateFormat;
const-string v3, [COLOR="Red"]"h"[/COLOR]
sget-object v4, Ljava/util/Locale;->ENGLISH:Ljava/util/Locale;
invoke-direct {v2, v3, v4}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V
iget-object v3, p0, Lcom/android/internal/widget/DigitalClock;->mCalendar:Ljava/util/Calendar;
invoke-virtual {v3}, Ljava/util/Calendar;->getTime()Ljava/util/Date;
also give me your keygaurd_unlock_xxx.xml.. just a little correction is there...
akash akya said:
bro you surly missed here :
Code:
new-instance v2, Ljava/text/SimpleDateFormat;
const-string v3, [COLOR="Red"]"h"[/COLOR]
sget-object v4, Ljava/util/Locale;->ENGLISH:Ljava/util/Locale;
invoke-direct {v2, v3, v4}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V
iget-object v3, p0, Lcom/android/internal/widget/DigitalClock;->mCalendar:Ljava/util/Calendar;
invoke-virtual {v3}, Ljava/util/Calendar;->getTime()Ljava/util/Date;
also give me your keygaurd_unlock_xxx.xml.. just a little correction is there...
Click to expand...
Click to collapse
Nah, I'm sure I copied everything. Here's my files, kindly check them out, thanks!
joeyhuab said:
Nah, I'm sure I copied everything. Here's my files, kindly check them out, thanks!
Click to expand...
Click to collapse
give me DigitalClock.smali also.. i will check once..
akash akya said:
bro you surly missed here :
Code:
new-instance v2, Ljava/text/SimpleDateFormat;
const-string v3, [COLOR="Red"]"h"[/COLOR]
sget-object v4, Ljava/util/Locale;->ENGLISH:Ljava/util/Locale;
invoke-direct {v2, v3, v4}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V
iget-object v3, p0, Lcom/android/internal/widget/DigitalClock;->mCalendar:Ljava/util/Calendar;
invoke-virtual {v3}, Ljava/util/Calendar;->getTime()Ljava/util/Date;
also give me your keygaurd_unlock_xxx.xml.. just a little correction is there...
Click to expand...
Click to collapse
akash akya said:
give me DigitalClock.smali also.. i will check once..
Click to expand...
Click to collapse
Here you go, this is my DigitalClock.smali from my Stock framework.jar
joeyhuab said:
Here you go, this is my DigitalClock.smali from my Stock framework.jar
Click to expand...
Click to collapse
try this one...
http://www.mediafire.com/?cm6dza6nepkbxjt
Thanks man!
akash akya said:
try this one...
http://www.mediafire.com/?cm6dza6nepkbxjt
Click to expand...
Click to collapse
Although there's something with the hours that doesn't feel right, this one works like a charm! THANKS A LOT!
joeyhuab said:
Although there's something with the hours that doesn't feel right, this one works like a charm! THANKS A LOT!
Click to expand...
Click to collapse
change red code in your keygaurd_screen _tab_unlock.xml
Code:
<com.android.internal.widget.DigitalClock [COLOR="Red"]android:layout_gravity="left"[/COLOR] android:id="@id/time" android:layout_marginTop="@dimen/keyguard_lockscreen_status_line_clockfont_top_margin" [COLOR="Blue"]android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin"[/COLOR] android:layout_marginBottom="12.0dip">
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_background" android:ellipsize="none" android:id="@id/timeDisplayBackground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="6.0dip" android:singleLine="true" />
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_foreground" android:ellipsize="none" android:id="@id/timeDisplayForeground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="6.0dip" android:singleLine="true" android:layout_alignLeft="@id/timeDisplayBackground" android:layout_alignTop="@id/timeDisplayBackground" />
<TextView android:textSize="14.0sp" android:textColor="@color/lockscreen_clock_foreground" android:ellipsize="none" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:layout_marginTop="18.0dip" android:singleLine="true" android:layout_toRightOf="@id/timeDisplayForeground" android:layout_alignBottom="@id/timeDisplayForeground" />
</com.android.internal.widget.DigitalClock>
if it looks odd, then tune blue code....
akash akya said:
change red code in your keygaurd_screen _tab_unlock.xml
Code:
<com.android.internal.widget.DigitalClock [COLOR="Red"]android:layout_gravity="left"[/COLOR] android:id="@id/time" android:layout_marginTop="@dimen/keyguard_lockscreen_status_line_clockfont_top_margin" [COLOR="Blue"]android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin"[/COLOR] android:layout_marginBottom="12.0dip">
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_background" android:ellipsize="none" android:id="@id/timeDisplayBackground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="6.0dip" android:singleLine="true" />
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_foreground" android:ellipsize="none" android:id="@id/timeDisplayForeground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="6.0dip" android:singleLine="true" android:layout_alignLeft="@id/timeDisplayBackground" android:layout_alignTop="@id/timeDisplayBackground" />
<TextView android:textSize="14.0sp" android:textColor="@color/lockscreen_clock_foreground" android:ellipsize="none" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:layout_marginTop="18.0dip" android:singleLine="true" android:layout_toRightOf="@id/timeDisplayForeground" android:layout_alignBottom="@id/timeDisplayForeground" />
</com.android.internal.widget.DigitalClock>
if it looks odd, then tune blue code....
Click to expand...
Click to collapse
LOL THIS happened when I did that. ) No worries, I'll just put it back to the old format, it looks good anyways! THANKS A LOT! :victory:
joeyhuab said:
LOL THIS happened when I did that. ) No worries, I'll just put it back to the old format, it looks good anyways! THANKS A LOT! :victory:
Click to expand...
Click to collapse
oops missed this :silly:
Code:
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_background" android:ellipsize="none" [COLOR="Red"]android:layout_gravity="center" [/COLOR]android:id="@id/timeDisplayBackground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="6.0dip" android:singleLine="true" />
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_foreground" android:ellipsize="none" [COLOR="red"]android:layout_gravity="center" [/COLOR]android:id="@id/timeDisplayForeground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="6.0dip" android:singleLine="true" android:layout_alignLeft="@id/timeDisplayBackground" android:layout_alignTop="@id/timeDisplayBackground" />
and as i said you have to tune left margin for cleaner look...
Hey, the files to edit the clock for me are not in framework.jar ): any helps=?
anerik said:
Hey, the files to edit the clock for me are not in framework.jar ): any helps=?
Click to expand...
Click to collapse
its impossible afiak... take look at xxx_framework.jar or framework_xxx.jar
akash akya said:
its impossible afiak... take look at xxx_framework.jar or framework_xxx.jar
Click to expand...
Click to collapse
Ok found it in android/widget in framework.jar, sorry that was my bad, but yet it is too different from yours to try!

How to Port Lidroid Toggles to JB 4.2 MTK / STOK BASE / NON CM / JB 4.2/ JB 4.3 / KK

HOW TO PORT JB 4.2 HORIZONTAL LIDROID TOGGLES
TO MTK / STOK BASE / NON CM / JB 4.2 /JB 4.3 / KK
Oke guys, I am back again here, I want to share how to port Lidroid toggle for Jelly Bean 4.2 up. : MTK / STOK BASE / NON CM / JB 4.2 / JB 4.3 / KK
do not try this on CM Base rom, or you will ended with SystemUI force closes :laugh::fingers-crossed:
Credit & Thank you very much , to
- lidroid, and Wanam for Guide [MOD][Android 4.1.2] Add Customizable 23 Statusbar Toggles To Samsung Jelly bean Roms,. and Thanks too to peetr_I learn some code from his thread [MOD][JB][ICS] Xperia T/TX/V port of Lidroid power widget,. and also thanks to
XDA.AGM I learn some code from his thread too [ JB ] [ A.0.400/1.100 ] [ XP-XU ]SystemUI with Lidroid Custom 18 Toggles [version 6], and you must thanks them too
- Recognized contributor @BOND1987
- Denny Mbol , Device Lenovo a316i MTK 6572
- CyanogenMod
- and also Thanks to Recognized Developer/themer @serajr for some toggles created by him
- [Unofficial Community] Galaxy Wonder CyanogenMod Indonesia
so we are going to port 21 Lidroid toggles :
( -Lock screen/screen-off action, -Reboot action, -Shutdown action, -Bluetoth, -GPS, -Flashlight, -Lockscreen, -MobileData, -Orientation, -ScreenTimeOut, -Sound, -Sync, -Wi-fi, -Wi-fi Hotspot, Battery info, USB Connection mode, USB Debugging, PlayPause, Next track, Previous track, Network mode 2G/3G )
ok lets go to Guide:
first of all need some requirement for this MOD-GUIDE
REQUIREMENT:
- BRAIN
- Patient
- experience
- Know how to decompile/recompiling Apk file
- Know how to decompile/recompiling jar Apk file
- notepad++
- Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools/ or else[/B]
STEP - 1
Decompile your SystemUI.apk
- Download attached Merge_to_SystemUI.apk exstract it and merge to your decompiled systemUI.apk
- SystemUI.apk/res/layout/gemini_status_bar_expanded.xml
add the red line
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.NotificationPanelView android:id="@id/notification_panel" android:background="@drawable/notification_panel_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/notification_panel_margin_left"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<View android:id="@id/handle" android:background="@drawable/status_bar_close" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="@dimen/close_handle_height" />
<include android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/carrier_label_height" android:layout_marginBottom="@dimen/close_handle_height" layout="@layout/gemini_carrier_label" />
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/close_handle_underlap" android:animateLayoutChanges="false">
<include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
[COLOR="Red"]<com.adi.systemui.powerwidget.PowerWidget android:id="@id/adi_widget" android:layout_width="fill_parent" android:layout_height="wrap_content" />[/COLOR]
<FrameLayout android:id="@id/toolBarSwitchPanel" android:background="@drawable/notification_header_bg" android:layout_width="fill_parent" android:layout_height="103.0dip">
<include layout="@layout/toolbar_view" />
<include layout="@layout/toolbar_indicator" />
<include layout="@layout/toolbar_divider" />
</FrameLayout>
<FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content">
<ViewStub android:id="@id/flip_settings_stub" android:layout="@layout/flip_settings" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="wrap_content" android:overScrollMode="ifContentScrolls">
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_row_min_height" />
</ScrollView>
</FrameLayout>
</LinearLayout>
</com.android.systemui.statusbar.phone.NotificationPanelView>
- SystemUI.apk/res/values/arrays.xml
add the red lines, to end of it before </resources>
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<array name="navbar_search_targets">
<item>@null</item>
<item>@*android:drawable/ic_action_assist_generic</item>
<item>@null</item>
<item>@null</item>
</array>
<array name="navbar_search_target_descriptions">
<item>@null</item>
<item>@*android:string/description_target_search</item>
<item>@null</item>
<item>@null</item>
</array>
<array name="navbar_search_direction_descriptions">
<item>@null</item>
<item>@*android:string/description_direction_up</item>
<item>@null</item>
<item>@null</item>
</array>
[COLOR="Red"]<string-array name="shutdown_reboot_options">
<item>@string/reboot</item>
<item>@string/reboot_recovery</item>
<item>@string/reboot_download</item>
</string-array>
<string-array name="shutdown_reboot_actions">
<item></item>
<item>recovery</item>
<item>download</item>
</string-array>
<string-array name="usb_connection_mode_options">
<item>@string/usb_mpt_mode</item>
<item>@string/usb_msc_mode</item>
</string-array>
<string-array name="usb_connection_mode_actions">
<item>mtp</item>
<item>mass_storage</item>
</string-array>
<string-array name="battery_info_options">
<item>@string/battery_info_info</item>
<item>@string/battery_info_usage</item>
</string-array>
<string-array name="battery_info_actions">
<item>battery_info</item>
<item>battery_usage</item>
</string-array>[/COLOR]
</resources>
- SystemUI.apk/res/values/ids.xml
add the red lines, to end of it before </resources>
Code:
<item type="id" name="sim_name">false</item>
<item type="id" name="sim_switch">false</item>
<item type="id" name="tool_bar_view">false</item>
<item type="id" name="close">false</item>
<item type="id" name="title">false</item>
<item type="id" name="bottom">false</item>
<item type="id" name="notification_inspect_item">false</item>
<item type="id" name="recent_remove_item">false</item>
<item type="id" name="recent_inspect_item">false</item>
[COLOR="Red"]<item type="id" name="adi_widget">false</item>
<item type="id" name="power_widget_button_text">false</item>
<item type="id" name="power_widget_button_indic">false</item>
<item type="id" name="power_widget_button">false</item>
<item type="id" name="power_widget_button_image">false</item>[/COLOR]
</resources>
- SystemUI.apk/res/values/integers.xml
add the red lines, to end of it before </resources>
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="config_maxNotificationIcons">5</integer>
<integer name="config_show_search_delay">200</integer>
<integer name="config_vibration_duration">0</integer>
<integer name="config_search_panel_view_vibration_duration">20</integer>
<integer name="one_finger_pop_duration_ms">10</integer>
<integer name="status_bar_recents_bg_gradient_degrees">90</integer>
<integer name="navigation_bar_deadzone_hold">333</integer>
<integer name="navigation_bar_deadzone_decay">333</integer>
<integer name="config_recent_item_min_alpha">3</integer>
<integer name="quick_settings_num_columns">3</integer>
<integer name="quick_settings_user_time_settings_tile_span">1</integer>
<integer name="quick_settings_brightness_dialog_short_timeout">2000</integer>
<integer name="quick_settings_brightness_dialog_long_timeout">4000</integer>
<integer name="blinds_pop_duration_ms">10</integer>
<integer name="notification_panel_layout_gravity">0x37</integer>
<integer name="settings_panel_layout_gravity">0x37</integer>
[COLOR="Red"]<integer name="quickpanel_scroll_threshold_port">5</integer>
<integer name="quickpanel_scroll_threshold_land">8</integer>[/COLOR]
</resources>
- SystemUI.apk/res/values/strings.xml
add the red lines, to end of it before </resources>
Code:
<string name="status_bar_help_text">"Access them anytime by swiping down.
Swipe down again for system controls."</string>
<string name="shutdown_prompt_title">Shutdown</string>
<string name="shutdown_prompt_message">Low battery and then will be auto shutdown</string>
<string name="shutdown_prompt_message_before">Low battery ! Your phone will shutdown in</string>
<string name="shutdown_prompt_message_after">seconds</string>
[COLOR="Red"]<string name="quickpanel_wifi_text">Wi-Fi</string>
<string name="quickpanel_dc_text">Data</string>
<string name="quickpanel_network_mode_text">Network</string>
<string name="quickpanel_sound_text">Sound</string>
<string name="quickpanel_sound_vibration_text">Ring.vibrate</string>
<string name="quickpanel_silent_text">Silent</string>
<string name="quickpanel_vibration_text">Vibration</string>
<string name="quickpanel_rotation_text">Rotation</string>
<string name="quickpanel_bluetooth_text">Bluetooth</string>
<string name="quickpanel_gps_text">GPS</string>
<string name="quickpanel_autosync_text">Auto Sync</string>
<string name="quickpanel_brightness_text">Brightness</string>
<string name="quickpanel_screen_timeout_text">Timeout</string>
<string name="quickpanel_lockscreen_text">Lockscreen</string>
<string name="quickpanel_airplane_text">Flightmode</string>
<string name="quickpanel_flashlight_text">Flashlight</string>
<string name="quickpanel_reboot_text">Reboot</string>
<string name="quickpanel_shutdown_text">Shutdown</string>
<string name="airplane_mode">In Flight mode</string>
<string name="shutdown_confirm">Your phone will shut down.</string>
<string name="screen_timeout_seconds">Screen timeout set to: %d second(s)</string>
<string name="screen_timeout_minutes">Screen timeout set to: %d minute(s)</string>
<string name="screen_timeout_hours">Screen timeout set to: %d hour(s)</string>
<string name="hamster">Phone Options</string>
<string name="yes">OK</string>
<string name="no">Cancel</string>
<string name="reboot">Reboot</string>
<string name="reboot_recovery">Recovery</string>
<string name="reboot_download">Download</string>
<string name="quickpanel_nfc_text">NFC</string>
<string name="quickpanel_wifi_ap_text">Wifi AP</string>
<string name="quickpanel_lockscreen_action_text">Sleep</string>
<string name="quickpanel_androidbeam_text">Android Beam</string>
<string name="brightness_settings_automatic">AUTO</string>
<string name="brightness_settings_title" />
<string name="quickpanel_usb_debugging_text">Debugging</string>
<string name="quickpanel_usb_connection_mode_text">USB Mode</string>
<string name="quickpanel_usb_current_mtp_title">Current mode: MPT</string>
<string name="quickpanel_usb_current_msc_title">Current mode: MSC</string>
<string name="usb_mpt_mode">MPT - Media Transfer</string>
<string name="usb_msc_mode">MSC - Mass Storage</string>
<string name="quickpanel_stay_awake_plugged_text">Stay Awake</string>
<string name="quickpanel_battery_info_text">Battery</string>
<string name="battery_info_info">Battery Information</string>
<string name="battery_info_usage">Battery Power Usage</string>
<string name="quickpanel_playpause_text">Play-Pause</string>
<string name="quickpanel_next_text">Next</string>
<string name="quickpanel_previous_text">Previous</string>
<string name="quickpanel_screenshots_text">Screenshot</string>[/COLOR]
</resources>
- Done and recompile your systemUI.apk
NOTE :
if you are using Apk Tool 2.0 or newer, and gettings error recompiling in the smali file,. check this explanation by :
- Recognized Themer @lacoursiere18 , here http://forum.xda-developers.com/showpost.php?p=53798727&postcount=34
and by Recognized Themer @Ticklefish, here http://forum.xda-developers.com/showpost.php?p=53824313&postcount=37
Credits and Thanks to them
STEP - 2
- Decompile the newly Recompiled APK again
Next go to
res/values/public.xml
open it with Notepad++
leave it, but keep it open
- smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
add the red lines :
Code:
.field private mOldPlmn:Ljava/lang/String;
.field mPixelFormat:I
.field private mPlmnLabel:Landroid/widget/TextView;
.field mPositionTmp:[I
.field mPostCollapseCleanup:Ljava/lang/Runnable;
[COLOR="Red"].field mPowerWidget:Lcom/adi/systemui/powerwidget/PowerWidget;[/COLOR]
.field private mPreviousConfigFontScale:F
.field private mPrevioutConfigOrientation:I
.field mQS:Lcom/android/systemui/statusbar/phone/QuickSettings;
.field mQueueLock:Ljava/lang/Object;
.field private mRecentsClickListener:Landroid/view/View$OnClickListener;
Code:
.end local v6 #signal:Landroid/view/View;
.end local v7 #systemIcons:Landroid/view/View;
:cond_0
iget-object v8, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mLightsOutAnimation:Landroid/animation/Animator;
invoke-virtual {v8}, Landroid/animation/Animator;->cancel()V
.line 2213
iget-object v8, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mLightsOnAnimation:Landroid/animation/Animator;
invoke-virtual {v8}, Landroid/animation/Animator;->cancel()V
.line 2215
if-eqz p1, :cond_1
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mLightsOutAnimation:Landroid/animation/Animator;
.line 2216
.local v0, a:Landroid/animation/Animator;
:goto_0
invoke-virtual {v0}, Landroid/animation/Animator;->start()V
.line 2218
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setAreThereNotifications()V
.line 2219
return-void
.line 2215
.end local v0 #a:Landroid/animation/Animator;
:cond_1
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mLightsOnAnimation:Landroid/animation/Animator;
goto :goto_0
.end method
[COLOR="Red"].method private setupPowerWidget()V
.locals 2
.prologue
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v1, [COLOR="Blue"]0x7f08012a[/COLOR]
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Lcom/adi/systemui/powerwidget/PowerWidget;
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/adi/systemui/powerwidget/PowerWidget;
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/adi/systemui/powerwidget/PowerWidget;
invoke-virtual {v0}, Lcom/adi/systemui/powerwidget/PowerWidget;->setupWidget()V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/adi/systemui/powerwidget/PowerWidget;
invoke-virtual {v0}, Lcom/adi/systemui/powerwidget/PowerWidget;->updateWidget()V
return-void
.end method[/COLOR]
.method private showAlwaysAskOrInternetCall(J)V
.locals 3
.parameter "simId"
.prologue
const/4 v2, 0x0
.line 3231
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSimIndicatorIconShow:Z
.line 3232
const-wide/16 v0, -0x2
cmp-long v0, p1, v0
if-nez v0, :cond_0
.line 3233
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSimIndicatorIcon:Landroid/widget/ImageView;
const v1, 0x7f020137
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setBackgroundResource(I)V
.line 3239
:goto_0
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mAirplaneMode:Z
if-nez v0, :cond_2
.line 3240
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSimIndicatorIcon:Landroid/widget/ImageView;
invoke-virtual {v0, v2}, Landroid/widget/ImageView;->setVisibility(I)V
.line 3245
:goto_1
return-void
.line 3234
:cond_0
const-wide/16 v0, -0x3
cmp-long v0, p1, v0
if-nez v0, :cond_1
.line 3235
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSimIndicatorIcon:Landroid/widget/ImageView;
const v1, 0x7f020136
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setBackgroundResource(I)V
goto :goto_0
.line 3237
:cond_1
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSimIndicatorIcon:Landroid/widget/ImageView;
const v1, 0x7f020135
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setBackgroundResource(I)V
goto :goto_0
change this, 0x7f08012a according to the value you got in your own public.xml
Code:
<public type="id" name="adi_widget" id="0x7f??????" />
search this method
Code:
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
scroll down in that method and add the red line
Code:
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v11, v1, v12}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
.line 772
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->resetUserSetupObserver()V
[COLOR="Red"] invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setupPowerWidget()V[/COLOR]
.line 774
new-instance v20, Landroid/content/IntentFilter;
invoke-direct/range {v20 .. v20}, Landroid/content/IntentFilter;-><init>()V
.line 775
.local v20, simInfoIntentFilter:Landroid/content/IntentFilter;
const-string v1, "android.intent.action.SIM_SETTING_INFO_CHANGED"
OR
you can put the line here
Code:
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mMediaEjectBroadcastReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v11, v1, v15}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
.line 800
move-object/from16 v0, p0
[COLOR="Red"] invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setupPowerWidget()V[/COLOR]
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
return-object v1
.line 440
.end local v12 #filter:Landroid/content/IntentFilter;
.end local v14 #indicator:Lcom/android/systemui/statusbar/toolbar/ToolBarIndicator;
.end local v15 #mediaEjectFilter:Landroid/content/IntentFilter;
.end local v19 #signalCluster:Lcom/android/systemui/statusbar/SignalClusterViewGemini;
.end local v20 #simInfoIntentFilter:Landroid/content/IntentFilter;
.end local v21 #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;
:cond_d
const/4 v1, 0x0
goto/16 :goto_0
NOTE !! if your device / os
Code:
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
doesn't have this line
Code:
move-object/from16 v0, p0
change this
Code:
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setupPowerWidget()V
to like this
Code:
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setupPowerWidget()V
STEP -3
Next : Download attached Powerwidget_public, and open it with Notepad++
so you have two public.xml now which is opened in the Notepad++
1. secondly decompiled public.xml
2. Powerwidget_public.xml
- go to , smali/com/adi/systemui/powerwidget/here...
there are a lot of smalis there
FIND ALL IDS in all that smalis THAT'S STARTED WITH
Code:
0x7fxxxxxx
EXAMPLE :
AutoRotateButton.smali
Code:
.method protected getText()I
.locals 1
const v0, [COLOR="Red"]0x7f0b00f9[/COLOR]
return v0
.end method
find this const v0, 0x7f0b00f9 in PowerWidget_public.xml what is calling for
and we find that is for
Code:
<public type="[COLOR="Red"]string[/COLOR]" name="[COLOR="Red"]quickpanel_rotation_text[/COLOR]" id="[COLOR="Blue"]0x7f0b00f9[/COLOR]" />
the IDS can be strings, ids, integer, arays, drawable, or layout, so you have to pay attention to this
next go to your own public.xml search for the value you got
Code:
<public type="[COLOR="Red"]string[/COLOR]" name="[COLOR="Red"]quickpanel_rotation_text[/COLOR]" id="[COLOR="Blue"]0x7f0??????[/COLOR]" />
and change the IDS in the smali with your own value
Code:
.method protected getText()I
.locals 1
const v0, [COLOR="Blue"]0x7f0??????[/COLOR]
return v0
.end method
Do it too, to all
Code:
0x7fxxxxxx
in all smalis in the Powerwidget folder.
STEP - 4
- Disable signature check
here : http://forum.xda-developers.com/showthread.php?t=1698352
or in here : http://forum.xda-developers.com/showpost.php?p=47592101&postcount=3
- AndroidManifest.xml
add the red line
Code:
<manifest [COLOR="Red"]android:sharedUserId="android.uid.system" android:process="system"[/COLOR] android:versionCode="17" android:versionName="4.2.2-eng.njdbuild03.1389868812" package="com.android.systemui" coreApp="true"
Code:
<uses-permission android:name="android.permission.ACCESS_ALL_DOWNLOADS" />
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
[COLOR="Red"]<uses-permission android:name="android.permission.REBOOT" />
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />[/COLOR]
<application android:label="@string/app_label" android:icon="@*android:drawable/platlogo" android:allowClearUserData="false" android:persistent="true" android:allowBackup="false">
<service android:name="SystemUIService" android:exported="true" />
<service android:name=".screenshot.TakeScreenshotService" android:exported="false" android:process=":screenshot" />
Code:
<service android:label="@string/jelly_bean_dream_name" android:name=".BeanBagDream" android:enabled="false" android:exported="true">
<intent-filter>
<action android:name="android.service.dreams.DreamService" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</service>
<activity android:theme="@*android:style/Theme.Wallpaper.NoTitleBar" android:label="@string/start_dreams" android:icon="@mipmap/ic_launcher_dreams" android:name=".Somnambulator" android:exported="true" android:excludeFromRecents="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.DESK_DOCK" />
</intent-filter>
</activity>
[COLOR="Red"]<receiver android:name="com.adi.systemui.powerwidget.NetworkModeReceiver" android:process="com.android.phone">
<intent-filter>
<action android:name="com.serajr.powertoggles.POWERTOGGLES_CHANGE_NETWORK_MODE" />
<action android:name="com.serajr.powertoggles.POWERTOGGLES_NEW_NETWORK_MODE" />
</intent-filter>
</receiver>[/COLOR]
</application>
</manifest>
- Done and recompile it , don't forget to sign it,
I ussually use ApkMultitools to decompile/recompile/sign APK
so if you use ApkMultitools, you can use my signer keys
download attached file, exstract it and merge to your ApkMultitools / other / here
- Download Attached Powerwidget.apk and Torch.apk, push it to your system/app/reboot
- edit your build.prop , to make USB connection mode toggle working properly
Code:
ro.sys.usb.storage.type=mtp[COLOR="Red"],mass_storage[/COLOR]
Additional :
- if the Flashlight toggle force closes, try to use this Torch.apk by raffie_archildz http://d-h.st/n99
- But if still force closes try to use this guide
if the Flashlight toggle from the guide doesn't work, try to use this smali http://d-h.st/mgb
- and don't forget to match the IDS too,.
- AndroidManifest.xml
Code:
<uses-permission android:name="android.permission.ACCESS_ALL_DOWNLOADS" />
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
[COLOR="Red"]<uses-permission android:name="android.permission.CAMERA" />[/COLOR]
[COLOR="Blue"]<uses-permission android:name="android.permission.REBOOT" />
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />[/COLOR]
<application android:label="@string/app_label" android:icon="@*android:drawable/platlogo" android:allowClearUserData="false" android:persistent="true" android:allowBackup="false">
<service android:name="SystemUIService" android:exported="true" />
Screenshots
{
"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"
}
fertamax om :victory: !!
Thread Updated !, please use New_PowerWidget.apk,.
cuz re-order prefrence doesn't work on the old PowerWidget.apk
:laugh:
Finally EPIC mod for Mediatek has come.
Thanx mastah!
Thanks a lot
Thanks a lot SIR for making a guide for MTK Devices ..Will try today .....
Great job!!
Another awesome write up!! Congrats bro!!
And you have used my network mode receiver too... great! :highfive:
thanx...
Thanks a ton !!! Great Guide
got working in 2nd try on my Mediatek mt6577 (LAVA IRIS 405) DEVICE with JB 4.2.2 ...
thanks a lot ....
But if i toggle to 3g mode then no network .
still i need to fix reboot and flashlight rest all working fine i've attached logcat of reboot fc pls have a look, i googled didn't find anything useful
Again thanks a lot for this mod :good:
pavan kr said:
got working in 2nd try on my Mediatek mt6577 (LAVA IRIS 405) DEVICE with JB 4.2.2 ...
thanks a lot ....
But if i toggle to 3g mode then no network .
still i need to fix reboot and flashlight rest all working fine i've attached logcat of reboot fc pls have a look, i googled didn't find anything useful
Again thanks a lot for this mod :good:
Click to expand...
Click to collapse
please check again all IDS in your smali got the correct value
ihiirrrrr love it ....work like a charm mastah...on imo raptor...:good:
wow
:good:work ...thx teacher
your awesome...another great guides from u... sungkem dulu ama guru... _/|\_
thanks...
Sent from my GT-I9152 using Tapatalk
It's touchwiz 4.2 :good::laugh:
budi78 said:
:good:work ...thx teacher
Click to expand...
Click to collapse
sitifire said:
your awesome...another great guides from u... sungkem dulu ama guru... _/|\_
thanks...View attachment 2791477
Sent from my GT-I9152 using Tapatalk
Click to expand...
Click to collapse
awesome guide suhu sangat sangat Thanks :good:
thanks lord adi...
Working in my MTK device..
Working in my MTK device.. But pls someone help me to understand the Steps .. Wrongs icons and names and icons merging with the toggle names

Categories

Resources