Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[MOD][GUIDE]25 Easy Grid Toggles (COPY PASTE WORK!)(NoobFriendly)(2.3+)(Update)

OP SpaceCaker

21st August 2014, 11:58 AM   |  #1  
SpaceCaker's Avatar
OP Recognized Themer / Contributor
Flag netherlands
Thanks Meter: 10,820
 
13,391 posts
Join Date:Joined: Mar 2011
More
HOW TO PORT 25 GRID TOGGLES!
With ease!



As many people know porting the lidroid toggles to you're stock device is a lot of work especially when u port the grid toggles.
why ?
because these toggles all needs you to add all ids and such and then in all smali you need to fix 0x730254 etc values.
BUT NOW!!! that time is over i have been working on these toggles for a few days now and its set so it will get all values etc with only packagename
so you only need to copy paste the stuff i say you to :)

SCREENS:

REQUIREMENT:
- BRAIN
- Patient
- Know how to decompile/recompiling Apk file
- notepad++
- Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools/ etc,

1. Decomple SystemUI.apk
/res/values/ids.xml
Add the following values to ids.xml
Code:
    <item type="id" name="spomc_toggle_toggle_button">false</item>
    <item type="id" name="spomc_toggle_icon_button">false</item>
    <item type="id" name="spomc_toggle_text_button">false</item>
2. SystemUI/res/values/strings.xml
Add the following strings to strings.xml
Code:
      <string name="spomc_always_use_accessory">Use by default for this USB accessory</string>
    <string name="spomc_bt">BT</string>
    <string name="spomc_data">Data</string>
    <string name="spomc_rotate">Rotate</string>
    <string name="spomc_wifi">Wi-Fi</string>
    <string name="spomc_gps">GPS</string>
    <string name="spomc_wifiap">Wi-Fi AP</string>
    <string name="spomc_airplane">Airplane</string>
    <string name="spomc_vibrate">Vibrate</string>
    <string name="spomc_silent">Silent</string>
    <string name="spomc_torch">Torch</string>
    <string name="spomc_sync">Sync</string>
        <string name="spomc_settings">Settings</string>
        <string name="spomc_control">Controller</string>
        <string name="spomc_ram">Clear RAM</string>
        <string name="spomc_brightness">Brightness</string>
        <string name="spomc_weather">Weather</string>
        <string name="spomc_volumes">Volume</string>
        <string name="spomc_widgets">Widget</string>
        <string name="spomc_reboot">Reboot</string>
        <string name="spomc_battery">Battery</string>
        <string name="spomc_troll">Troll</string>
        <string name="spomc_flash">Flash</string>
        <string name="spomc_prev">Previous</string>
        <string name="spomc_next">Next</string>
        <string name="spomc_play">Play/Pause</string>
        <string name="spomc_sleep">Sleep</string>      
        <string name="spomc_default_wifi">WIFI</string>
    <string name="spomc_default_bt">BT</string>
    <string name="spomc_default_gps">GPS</string>
    <string name="spomc_default_rotate">ROTATE</string>
    <string name="spomc_default_vibrate">VIBRATE</string>
        <string name="spomc_default_control">CONTROL</string>
    <string name="spomc_default_sync">SYNC</string>
        <string name="spomc_default_data">DATA</string>
    <string name="spomc_default_silent">SILENT</string>
        <string name="spomc_default_settings">SETTINGS</string>
        <string name="spomc_default_airplane">AIRPLANE_MODE</string>
        <string name="spomc_default_ram">CLEAR_RAM</string>
        <string name="spomc_default_brightness">BRIGHTNESS</string>
        <string name="spomc_default_weather">WEATHER</string>
        <string name="spomc_default_volumes">VOLUMES</string>
        <string name="spomc_default_widgets">WIDGETS</string>
        <string name="spomc_default_reboot">REBOOT</string>
        <string name="spomc_default_battery">BATTERY</string>
        <string name="spomc_default_troll">TROLL</string>
        <string name="spomc_default_flash">FLASH</string>
        <string name="spomc_default_prev">PREV</string>
        <string name="spomc_default_next">NEXT</string>
        <string name="spomc_default_play">PLAY</string>
        <string name="spomc_default_sleep">SLEEP</string>
        <string name="spomc_default_profile">PROFILE</string>
        <string name="spomc_default_cpu">CPU</string>
3. SystemUI/res/values/styles.xml
Add the following strings to styles.xml
Code:
    <style name="brucekey_icon">
        <item name="android:disabledAlpha">?android:disabledAlpha</item>
        <item name="android:background">@drawable/togglebtn_bg</item>
        <item name="android:layout_width">wrap_content</item>
        <item name="android:layout_height">wrap_content</item>
    </style>
3. Copy paste the Attached Content.zip to ur systemui/
This will add the resources,arrays.xml,layout and toggle smali's
4. SystemUI/res/layout/**** any layout you want.
add the following in it to load the toggles.
Code:
<com.spacey.xperiatabs.toggles.TogglesView android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" />
5. Now compile the systemui.apk and it should be working ;)
6. Add the ToggleSettings.apk to system/app

BUGS:
  1. Data toggle Possibly working not sure yet
  2. DONT! change any png names or string names etc it wont work ;)
  3. Profile Picture and Name are set blank if u select it pres sthe toggle and edit it to ur name and a picture. the picture will appear if you reboot.

CREDITS:
  • AuliaYF
  • AOKP
  • CM
  • TentenPonce
  • TuxKids
  • Aryne
  • Potato Bro's
  • MOSP team
  • SonyXperiaZ2 for toggle pngs :p
  • Dedy Prayetno
  • SpaceCaker ofcourse!

Attachements:
Content.zip dl link https://dl.dropboxusercontent.com/u/.../ContentV9.zip
or see bottom of post for attached zip

ToggleSettings dl link https://dl.dropboxusercontent.com/u/...leSettings.apk
or see bottom of post for attached apk
Attached Files
File Type: zip ContentV9.zip - [Click for QR Code] (150.1 KB, 1072 views)
File Type: apk ToggleSettings.apk - [Click for QR Code] (764.9 KB, 1070 views)
Last edited by SpaceCaker; 26th August 2014 at 04:24 PM.
The Following 24 Users Say Thank You to SpaceCaker For This Useful Post: [ View ]
21st August 2014, 11:58 AM   |  #2  
SpaceCaker's Avatar
OP Recognized Themer / Contributor
Flag netherlands
Thanks Meter: 10,820
 
13,391 posts
Join Date:Joined: Mar 2011
More
CHANGELOG:
  • V9 Ninth release:
  • 10 new toggles! Yeah you heard it right !!! 10 NEW TOGGLES!
  • Play/Pause, Previous, Next Music buttons.
  • Cpu Toggle ( shows current cpu speed, update on press)
  • Profile Toggle ( Change name and Picture)
  • Reboot toggle
  • Battery toggle
  • Troll toggle
  • Flash Toggle
  • Sleep Toggle
  • Scrollview fixation.
  • Some bugfixes
  • More ??
  • V8 Eight release:
  • Private release this was for testers.
  • Unreleased on XDA
  • V7 Seventh release:
  • Add New Weather Toggle ( Need Google News And Weather app installed Also known as GenieWidget.apk)
  • Add Volumes Toggle ( Work In Progress ;P )
  • Brightness Popup Touch outside dialog will close it
  • Small Bug Fix
  • V6 Sixth release:
  • Possible Data on/off fix ( hope it works properly :P )
  • Fix Single time open Settings,Control and Brightness only.
  • Small Bugfixes in toggle code.
  • V5 Fifth release:
  • Add Brightness Toggle.
  • Layout fix for 2row toggles
  • Brightness Slider PopUp (MUAHHAHAHA Tricky way of doing it but works lol)
  • FC fix
  • V4 Fourth release:
  • Toggle Layout
  • Toggles JB switch look feel or 4 Row normal toggles
  • V3 Third release:
  • Added Reorder method. special thanks to Dedy
  • V2 Second release:
  • Added JB api version for collapsestatusbar
  • now on 4.1+ it will close statusbar onlongclick and settings/control toggle click aswell
  • V1 Initial Release:
  • firstbuild

FAQ:
  • Weather widget not working???:
  • This is possible cause of you not having set up ur location in Google News and Weather app.
  • You also might not have GenieWidget.apk installed. Try the attached apk
  • Profile Picture not working or updating???:
  • This is being worked on as of now reboot device or restart systemui to apply change.
Attached Files
File Type: apk GenieWidget.apk - [Click for QR Code] (746.5 KB, 207 views)
Last edited by SpaceCaker; 26th August 2014 at 04:31 PM.
The Following 9 Users Say Thank You to SpaceCaker For This Useful Post: [ View ]
21st August 2014, 12:07 PM   |  #3  
PineappleOwl's Avatar
Recognized Themer
Flag La Union
Thanks Meter: 858
 
490 posts
Join Date:Joined: Mar 2013
Donate to Me
More
Reserved for some crazy modification if ever I have
The Following User Says Thank You to PineappleOwl For This Useful Post: [ View ]
21st August 2014, 12:29 PM   |  #4  
Senior Member
Flag Kiev
Thanks Meter: 26
 
210 posts
Join Date:Joined: Oct 2013
More
Thx, its work for my LG P713 (4.1.2)
21st August 2014, 12:31 PM   |  #5  
SpaceCaker's Avatar
OP Recognized Themer / Contributor
Flag netherlands
Thanks Meter: 10,820
 
13,391 posts
Join Date:Joined: Mar 2011
More
Quote:
Originally Posted by the_vanya1

Thx, its work for my LG P713 (4.1.2)

It should work
Only i think settings and controller toggle and long click wont pull up statusbar automaticly will fix it later

Can you post a screen?

Sent from my C5303 using XDA Free mobile app
21st August 2014, 12:50 PM   |  #6  
Senior Member
Al-Menufia
Thanks Meter: 745
 
1,254 posts
Join Date:Joined: Nov 2013
Donate to Me
More
Rock !!!

Sent from my Nexus 5 using XDA Premium 4 mobile app
21st August 2014, 01:31 PM   |  #7  
Senior Member
Flag Kiev
Thanks Meter: 26
 
210 posts
Join Date:Joined: Oct 2013
More
its awesome, but vibration toggle dont work for me
Attached Thumbnails
Click image for larger version

Name:	4991621.png
Views:	406
Size:	35.4 KB
ID:	2906229  
Last edited by the_vanya1; 21st August 2014 at 03:15 PM.
The Following User Says Thank You to the_vanya1 For This Useful Post: [ View ]
21st August 2014, 02:59 PM   |  #8  
Senior Member
Al-Menufia
Thanks Meter: 745
 
1,254 posts
Join Date:Joined: Nov 2013
Donate to Me
More
Quote:
Originally Posted by the_vanya1

its awesome, but I dont have the vibration toggle

Can u share this L Notification Bar source?

Sent from my Nexus 5 using XDA Premium 4 mobile app
21st August 2014, 03:11 PM   |  #9  
SpaceCaker's Avatar
OP Recognized Themer / Contributor
Flag netherlands
Thanks Meter: 10,820
 
13,391 posts
Join Date:Joined: Mar 2011
More
Quote:
Originally Posted by the_vanya1

its awesome, but I dont have the vibration toggle

vibrate button is there.
al 12 are

to rearrange currently you need to disable all toggles and enable the toggles one by one in the order you want it.
currently working on a fix for tht tough
21st August 2014, 03:18 PM   |  #10  
Senior Member
Flag Kiev
Thanks Meter: 26
 
210 posts
Join Date:Joined: Oct 2013
More
Quote:
Originally Posted by SpaceCaker

vibrate button is there.
al 12 are

to rearrange currently you need to disable all toggles and enable the toggles one by one in the order you want it.
currently working on a fix for tht tough

sorry bro, i mean vibration toggle dont work for me

Post Reply Subscribe to Thread

Tags
lidroid, noob, spacecaker, toggles
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes