Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,809,359 Members 39,726 Now Online
XDA Developers Android and Mobile Development Forum

[AOSP/CM/Stock]Adding Lidroid Toggles + Grid View[GB]

Tip us?
 
san122
Old
(Last edited by san122; 12th February 2014 at 12:04 PM.)
#1  
san122's Avatar
Senior Member - OP
Thanks Meter 1,559
Posts: 1,229
Join Date: Jan 2013
Location: Unavailable.
Default [AOSP/CM/Stock]Adding Lidroid Toggles + Grid View[GB]

Hello guys today iam going to teach you how to add lidroid toggles in grid view in AOSP/CM/Stock roms.
Maybe i have forgot something so dont blame me Let me know it first and i will change it
.



Things REQUIRED.

1.Patience [Heavily Needed]
2.Lots of time.
3.My provided files.Here: Public.xml and Lidroid_Resources.zip
4.Notepad++ etc.


The guide is divide into two parts.
1.XML PART [Includes xml editing ]
2.SMALI PART [ Includes smali editing ]



Lets start with XML PART first.

STEP 1

Open ids.xml under res/values foler and add these in last above

Code:
<item type="id" name="quickpanel_button">false</item>
    <item type="id" name="quickpanel_text">false</item>
    <item type="id" name="quickpanel_image">false</item>
    <item type="id" name="quickpanel_indicator">false</item>
    <item type="id" name="Lidroid">false</item>

STEP 2

Open dimens.xml under res/values foler and add these in last above
Code:
</resources>
Code:
quickpanel_button_height">79.0px
STEP 3
Open strings.xml under res/values foler and add these in last above
Code:
    <string name="quickpanel_wifi_text">Wi-Fi</string>
    <string name="quickpanel_bluetooth_text">Bluetooth</string>
    <string name="quickpanel_gps_text">GPS</string>
    <string name="quickpanel_sound_text">Sound</string>
    <string name="quickpanel_sound_vibration_text">"Sound Vibration"</string>
    <string name="quickpanel_silent_text">Silent</string>
    <string name="quickpanel_vibration_text">Vibration</string>
    <string name="quickpanel_rotation_text">"Auto rotation"</string>
    <string name="quickpanel_shutdown_text">Phone will be shutdown</string>
    <string name="quickpanel_shutdown_confirm">Shutdown</string>
    <string name="quickpanel_sound_vibrate">Vibrate</string>
    <string name="quickpanel_sound_sound">Sound</string>
    <string name="quickpanel_sound_silent">Silent</string>
    <string name="quickpanel_sound_sound_vibrate">Sound Vibrate</string>
    <string name="quickpanel_sync">Sync</string>
    <string name="quickpanel_wifiap">Wifi Ap</string>
    <string name="quickpanel_wifi">Wifi</string>
    <string name="quickpanel_rotation">Auto Rotate</string>
    <string name="quickpanel_airplane">Airplane</string>
    <string name="quickpanel_bluetooth">Bluetooth</string>
    <string name="quickpanel_brightness">Brightness</string>
    <string name="quickpanel_flashlight">Flashlight</string>
    <string name="quickpanel_gps">GPS</string>
    <string name="quickpanel_lockscreen">Lockscreen</string>
    <string name="quickpanel_mobiledata">Data</string>
    <string name="quickpanel_reboot">Reboot</string>
    <string name="quickpanel_reboot_text">Phone will reboot</string>
    <string name="quickpanel_screen_timeout">Screen Timeout</string>
    <string name="quickpanel_recovery">Recovery</string>
STEP 5
Delete these if they are already present
Code:
<string name="quickpanel_wifi_text">Wi-Fi</string>
    <string name="quickpanel_bluetooth_text">Bluetooth</string>
    <string name="quickpanel_gps_text">GPS</string>
    <string name="quickpanel_sound_text">Sound</string>
    <string name="quickpanel_sound_vibration_text">"Sound Vibration"</string>
    <string name="quickpanel_silent_text">Silent</string>
    <string name="quickpanel_vibration_text">Vibration</string>
    <string name="quickpanel_rotation_text">"Auto rotation"</string>
STEP 6
Merge attached files with your SystemUI.apk


STEP 7
Recompile Your App.


STEP 8
Decompile it again.

STEP 9
Open Statusbar_expanded.xml or any other xml where you want to place lidroid toggles.

STEP 10
And Add this where you want to place the lidroid toggles.
Code:
    <com.lidroid.systemui.quickpanel.PowerWidget android:id="@id/Lidroid" android:layout_width="fill_parent" android:layout_height="wrap_content" />

Now lets complete the SMALI PART

SMALI PART

STEP 11
Open com/android/systemui/statusbar/StatusBarService.smali

STEP12
In
Code:
# instance fields
Below
Code:
.field mPositionTmp:[I
Add this line
Code:
.field mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;

STEP 13

In
Code:
 .method private makeStatusBarView(Landroid/content/Context;)V

Add this in last above
Code:
 .line (A numeric value will be there)
    return-void
    

.line 656
    iget-object v5, p0, Lcom/android/systemui/statusbar/StatusBarService;->mExpandedView:Lcom/android/systemui/statusbar/ExpandedView;

    const v6, 0x7f090039

    invoke-virtual {v5, v6}, Lcom/android/systemui/statusbar/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/StatusBarService;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;

    iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;

    invoke-virtual {v6}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V
STEP 14
Open your public.xml
Search for "Lidroid" id and copy its public id and replace it with id of above code i.e with "0x7f090039"


STEP 15
OPEN Statusbarservice.smali again

STEP 16
In
Code:
 .method public addIcon(Ljava/lang/String;IILcom/android/internal/statusbar/StatusBarIcon;)V
Add this in last above
Code:
.line (A numeric value will be there)
    return-void
Code:
.line 1900
    iget-object v1, p0, Lcom/android/systemui/statusbar/StatusBarService;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;

    invoke-virtual {v1}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->updateWidget()V
NOTE..
Here "0x7f090039" is the public id of id "Lidroid"


STEP17
Now open all files in com/lidroid/systemui/quickpanel folder

Search "0x7f" Copy the whole id .

Open my provided public.xml

Search for that id in my public.xml

Copy the text of that id.

Like if my Public id is "0x7f030011"



Then i will copy "quickpanel_button".

Now find same text in your public.xml

Copy its public id .

And replace the id of all smali files with your public.xml's id.

Similarly do this with all smali files available in quickpanel folder.

STEP 18
Now open your apps Android-Manifest.xml.

And add this in last above
Code:
   </application>
Code:
  <activity android:theme="@*android:style/Theme.NoTitleBar.Fullscreen" android:name="com.lidroid.systemui.quickpanel.FlashlightActivity" android:clearTaskOnLaunch="true" android:launchMode="singleTask" android:configChanges="keyboardHidden|orientation" />
Since You have edited Android-Manifest.xml you need to sign apk file.

STEP 19
Recompile it .

STEP 20
Sign it.


And push to system/app
The Following 16 Users Say Thank You to san122 For This Useful Post: [ Click to Expand ]
 
san122
Old
(Last edited by san122; 12th February 2014 at 12:32 PM.)
#2  
san122's Avatar
Senior Member - OP
Thanks Meter 1,559
Posts: 1,229
Join Date: Jan 2013
Location: Unavailable.
CREDITS;;
ryanfebriyadi
PineappleOwl
MuSaddiq
Lidroid
serajr
The Following 3 Users Say Thank You to san122 For This Useful Post: [ Click to Expand ]
 
san122
Old
(Last edited by san122; 11th February 2014 at 09:35 AM.)
#3  
san122's Avatar
Senior Member - OP
Thanks Meter 1,559
Posts: 1,229
Join Date: Jan 2013
Location: Unavailable.

Reserved for more....
The Following 2 Users Say Thank You to san122 For This Useful Post: [ Click to Expand ]
 
GSculerlor
Old
(Last edited by GSculerlor; 29th March 2014 at 04:29 AM.)
#4  
GSculerlor's Avatar
Senior Member
Thanks Meter 84
Posts: 428
Join Date: Oct 2013
Location: Malang
Reserved
Edit : If i want to place it in ROM, so i must sign all the apk of my ROM ?
Sent from my GT-S5360 using xda app-developers app
What You SEE Is What You GET
Quote:
Getting Close With My Work :

The Following User Says Thank You to GSculerlor For This Useful Post: [ Click to Expand ]
 
m4RinKo2
Old
#5  
m4RinKo2's Avatar
Senior Member
Thanks Meter 460
Posts: 828
Join Date: Oct 2012
Thanks for sharing!
 
aemier
Old
#6  
aemier's Avatar
Junior Member
Thanks Meter 0
Posts: 14
Join Date: Dec 2013
Location: blitar

 
DONATE TO ME
Please help me.. After i flash costum kernel Merruk v.2.5 ,, i have problem charge batrai pada saat hp off tidak ada gambar batrai charger.. Please help me... Sorry i bad english
 
kumar akarsh
Old
#7  
kumar akarsh's Avatar
Senior Member
Thanks Meter 34
Posts: 146
Join Date: Dec 2012
awesome guide sir!!!!!!
prezzzzzzzzzz thanks if i helped you!!!!!!!!!!
 
san122
Old
#8  
san122's Avatar
Senior Member - OP
Thanks Meter 1,559
Posts: 1,229
Join Date: Jan 2013
Location: Unavailable.
HAS anyone tried?

Sent from my GT-S5360 using Tapatalk 2
 
san122
Old
#9  
san122's Avatar
Senior Member - OP
Thanks Meter 1,559
Posts: 1,229
Join Date: Jan 2013
Location: Unavailable.
Quote:
Originally Posted by aemier View Post
Please help me.. After i flash costum kernel Merruk v.2.5 ,, i have problem charge batrai pada saat hp off tidak ada gambar batrai charger.. Please help me... Sorry i bad english
I cant undersrtand what are u saying?

Sent from my GT-S5360 using Tapatalk 2
The Following User Says Thank You to san122 For This Useful Post: [ Click to Expand ]
 
m4RinKo2
Old
#10  
m4RinKo2's Avatar
Senior Member
Thanks Meter 460
Posts: 828
Join Date: Oct 2012
Hi. U guided me once. And it works but toogles are misplaced. I looked at every file but cant see anything wrong. Here is my systemui, so if u have time , could you take a look at it? TIA
Attached Thumbnails
Click image for larger version

Name:	SC20140212-103104.png
Views:	479
Size:	31.1 KB
ID:	2574855  
Attached Files
File Type: apk SystemUI.apk - [Click for QR Code] (718.4 KB, 97 views)

The Following User Says Thank You to m4RinKo2 For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes