[Android Themes] SpaceCaker:
How to add new/change toggles ?

As u can see i highlighted some stuff with pink color

[COLOR="Magenta"][I]const-string v2, "com.android.settings"[/I][/COLOR]

Packagename

[COLOR="Magenta"][I]const-string v2, "com.android.settings.Settings"[/I][/COLOR]

Activity

As u can see it has this tag inside

com.android.settings

packagename

com.android.settings.Settings

Activity

this is the package/action name of a app / option inside settings.apk

u can change this to any thin u want like

taskmanager it will be like this

const-string v2, "com.sec.android.app.controlpanel"

this is packagename, and

const-string v2, "com.sec.android.app.controlpanel.activity.JobManagerActivity"

this is activity,

now if u add it to a new Onclick method it will look like this

.method public [COLOR="RoyalBlue"]SpaceCakerButton[/COLOR](Landroid/view/View;)V
.locals 5
.parameter "view"

.prologue
.line 99
.line 100
:try_start_0
new-instance v1, Landroid/content/Intent;

invoke-direct {v1}, Landroid/content/Intent;-><init>()V

.line 102
.local v1, intent:Landroid/content/Intent;
const-string v2, "android.intent.action.MAIN"

invoke-virtual {v1, v2}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

.line 105
const/high16 v2, 0x1000

invoke-virtual {v1, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

.line 107
[COLOR="RoyalBlue"]const-string v2, "com.android.settings"[/COLOR]

[COLOR="RoyalBlue"]const-string v3, "com.android.settings.Settings"[/COLOR]

invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

invoke-virtual {p0, v1}, Lcom/android/systemui/SystemUIService;->startActivity(Landroid/content/Intent;)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

.line 109
.line 112
.end local v1 #intent:Landroid/content/Intent;
:goto_0
return-void

.line 115
:catch_0
move-exception v0

.line 117
.local v0, e:Ljava/lang/Exception;
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

goto :goto_0
.end method

this is a new method

of course it wont work yet as u need to add it to the layout

goto res/layout/quickpanel_quick_settings_space.xml

add something like this

<FrameLayout android:id="@id/settings_button" android:background= [MENTION=3944923]drawab[/MENTION]le/tile_toggle" android:layout_width="106.0px" android:layout_height="100.0px" android:layout_weight="1.0">
<ImageView android:layout_gravity="center_horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" [COLOR="Red"]android:src [MENTION=3944923]drawab[/MENTION]le/taskmanagerpng"[/COLOR][COLOR="Red"]android:onClick="SpaceCakerButton"[/COLOR] />
<TextView android:textSize="12.0dip" android:textColor="#ffffffff" android:gravity="center" android:layout_gravity="bottom" android:background="#00000000" android:layout_width="106.0px" android:layout_height="wrap_content" android:layout_marginBottom="15.0px" [COLOR="Red"]android:text="TaskManager"[/COLOR] />
</FrameLayout>

the red stuff u need to edit to the app/ icon / text /

.method public SpaceCakerButton

u used

[MENTION=3944923]drawab[/MENTION]le/taskmanagerpng u need to add a png that has the name taskmanagerpng to drawable-mdpi

android:onClick="[COLOR="Magenta"]SpaceCakerButton[/COLOR]"

noticed the pink part ?

this is the text i used after .method public

this makes the button actually work

And ofcourse

android:text="[COLOR="Magenta"]TaskManager[/COLOR]"

this is what the text needs to say under the app :D