yashsingh1/xdaforums huggingface dataset:
[Android Themes] srihari210:
Good Suggestion

If you are changing code, I have a good suggestion for you...

Right now, we are changing smali files for everything we create (for new toggles). So, we can skip this smali changes...

So, here it is... Every toggle, has an image and Text(bottom). So, For all images use single onclick method. And how do we get the package/activity name. We can put HINT for text on toggle. Let this hint have ActivityName to be launched(will be in XML). So, ur code will use getHint method to get the class name and executes that activity intent in Hint.

From this, if user want to add toggles, he ll just add drawables, add new Imageview, textview(with hint as activity to be launched). Thats it.. he ll have new toggles. This will be damn easy for users.

Let me know if Im clear to u. Ping me if necessary. As I dont have source code, I cant do anything:mad:

- Hit Thanks if I help you...
[Android Themes] SpaceCaker:
ahh wel thats possible but i need a preview for the idea ;)

to se hoe it acts
[Android Themes] srihari210:
dont worry, 2mrow, I will give complete code... One XML and Method of how to use that.... Is that fine
[Android Themes] kid1519:
help me. please

when you online.

thanks.
[Android Themes] srihari210:
As said, attached is the code and sample apk for testing...

For this code, I just used packagename. If we want specific class to run, we can use other imageview property ie ContentDescription and we can handle this on code. Let me know if u need info on this...

So, if users only only app to run, he ll give package name in Tag property and if he wants specific activity to run, he will add contentdescription tag aswell. In our code, if contentdesc tag is not blank, we run activity else, launch like normal app...

NOTE: For testing, I used, QUICKSETTINGS App from Playstore. To remove forceclose on second button, install QUCIKSETTINGS app from playstore. This is to test if it works for other app launch aswell.

I TESTED this in S3. if u r using GB, this might not work as apk level is for ICS. Sorry for that, my pc has ICS SDK and I have to test this on my friend phone :)

I have a small request for you... I ll ping u when u r there..
[Android Themes] thirdzcee:
im interested in this, but i dont know what to do, i see inside the source there is home.java ... do i assemble the java into smali?

EDIT: hmmm looks like i cant just assemble this java into smali usng javac
[Android Themes] srihari210:
Nope, we need to convert that to smali code. This is a prototype given to this forum DEV.

I dont know, how to add smali files to systemUI. May be dev will get some idea on this.

Even if someone who knows adding smali code can help me. Ping me if anyone is interested.
[Android Themes] thirdzcee:
well if im not mistaken the smali code is already in test.apk, i decompiled it and its home.smali ,,, looks like now we just have to find a way to integrate this smali to systemui
[Android Themes] srihari210:
Thats exactly wht I want, How to integrate SMALI file to SYSTEMUI.APK. I know, we need to put Home.apk Togglesbutton method to statusbarservice.smali but I just dont know HOW????
[Android Themes] thirdzcee:
i dunno if this is right or not but i was thinking of merging bothe smalis but i i have no idea how to merge both direct methods since the direct method from both smalis have .method public constructor <init>()V in each of them
[Android Themes] :
Brother,

I need your layout file of quickspace.xml to get the toolbar in it.

And adding any application in SystemUIServive.smali is easy if you have manifest.xml of that application.

You can see I added camera in toggles in my screen shot.

If any one want this I can do it for him.
[Android Themes] srihari210:
We just need to merge only one method. One is the default constructior. In that, we ll show activity frame. We dont need that. We just need other one.. But, otherone has below code...

.line 26

.local v1, LaunchIntent:Landroid/content/Intent;

invoke-virtual {p0, v1}, Lcom/example/Testing/Home;->startActivity(Landroid/content/Intent;)V

We should not have any instance of Example/Testing/Home in this method. In my source, i didnt use that, but smali file has that. We need to get rid of it. We need exta knowledge to merge these methods to smali files... Lets ask some great devs in XDA.
[Android Themes] SpaceCaker:
we can also use

com.example.home line

instead in layout

and use the smalis of the app

and also the com/example

u can edit manually with com/android

etc

if u compile from source it has

.paclage

com.example.testing

but in smali it will return more times
[Android Themes] thirdzcee:
sure no problem here you go View attachment 2125382

remove .zip extension

and i resized the px since my device is xhdpi

yeah,,, well lets hope for the best for it
[Android Themes] srihari210:
Thanks for your interest... We are thinking way beyond it....

So, now if u want to add Camera button, u ll change ur SYSTEMUI LAYOUT and SMALI files right. Our theme is, we dont have to change SMALI files to add new toggles/buttons. ONE SMALI Method, should serve all of them. So, For Every button, ONCLICK method will be same.

But, u ll give package & Activity name as tag&Desction properties for every Imageview tag. Our Method, will read these values and will automatically run the activity specified in Tag/Descriptioin.

For Example

<Imageview android:src="@drawable/button1" android:eek:NCLICK="TogglePressed" android:TAG="com.android.settings" android:XXXXXX="HomeActivity">

<Imageview android:src="@drawable/button2" android:eek:NCLICK="TogglePressed" android:TAG="com.android.camera" android:XXXXXX="panorama">

so, wht is done in pgm is

TogglePressed(View V) {

ImageView IV = (ImageView)V;

String PackageName= IV.getTag().TOSTRING();

String Actname = PackageName + IV.getXXXXX().TOSTRING;

Run Activity (PackageName, Actname).

}

As Tag & XXXXX properties are different for every Imagebutton, PackageName,ActivityName string will change dynamically. So, We dont have to change this for every new button. That means, U DONT HAVE TO ADD .method for every new button u add.

So, if u want to add new button... Just add Imagebutton, with Drawable, Tag, XXXX properties. That will be enough. Just compile and push. u ll get new button working..

Our problem is, we dont know how to add this method in smali to STATUSBARSERVICE.SMALI... We are waiting for dev to respond
[Android Themes] :
Thanks for clearing my doubts. But if I'm not wrong then also we have edit the single smali and add that method and also have to add this in quick panel space.

So why not we can add that in SystemUIService.smali. Because for adding that smali according to you also we have add application in our zip.

And doing so will be harder for providing patches.

[MENTION=3862405]SpaceCaker[/MENTION] Sir

I want to add original toggles of my SystemUI in quick panel.xml so that when we click on Wi-Fi, instead of opening Wi-Fi setting, it will On off Wi-Fi. Likely to work same as the toggles we originally have in SystemUI.

[MENTION=4639765]thirdzcee[/MENTION],

Good one brother will try it tonight.

BTW,

Why you used so many relative layout.

Adding toggles can also be done through linear layout and there is nothing wrong happening add you have seen in my screenshots.

If you want,I can also upload my quick space.Xml for this.

""Hitting Thanks Don't Cost You Anything, then, Why You All Are Getting Bothered in Doing So. Hitting Thanks Increases My Motivation to Work for this Community....:):):)""
[Android Themes] SpaceCaker:
i can try to implement i SystemUI source of aosp / cm

and compile.An then compare the files

maybe that way we know hoe ;)
[Android Themes] thirdzcee:
Just a little off topic although somehow it kinda conerns the toggles, this question is especially for those with the mt6577 device... Any of you guys got lidroid toggles to work??? Ibwas thinking about it since the toggles are both a switch and can launch the settings option of each toggle that corresponds with it, ive been searching for a guide to implement those toggles on aosp roms but it seems all guides ive found are for samsung
[Android Themes] :
I tried almost was there. But my systemui was not detecting the lidroid-res.apk

And even seniors like goldieking and others tried but no one was understanding that why it's happening.

Tried with 3 different lidroid but unfortunately nothing worked.

And even with your quick space.xml my SystemUI is force closing.

""Hitting Thanks Don't Cost You Anything, then, Why You All Are Getting Bothered in Doing So. Hitting Thanks Increases My Motivation to Work for this Community....:):):)""
[Android Themes] thirdzcee:
Did you delete the stock toggles from gemini_statbar_expanded??? Because you shouldn't... Doing that will cause fc of the systemui.. Just hide it with 0.0dip on layout width and height and adjust the margintop of scrollview of notifications to fill up the space where the toggles used to be, and if you plan to remove the name notifications hide it using 0.0dip as well removing it will cause fc every time your screen rotates

---------- Post added at 07:54 PM ---------- Previous post was at 07:51 PM ----------

Bummer on the lidroid toggles... Maybe you can gimme links to the ones that you used even though systemui couldn't detect it, I wanna give it a try as well
[Android Themes] SpaceCaker:
assign alllayouts ids pngs and such from Lidroid-rez.apk

to systemui.apk

this takes wayyyu more editing then normal

vut it works

search for xperia ;)

they are closest to aosp
[Android Themes] :
I haven't deleted it I just made it 0.0 as it was earlier suggested by SpaceCaker Sir.

Btw here is one I tried from even visiting all post from last you will find my posts as well.....

http://xdaforums.com/showthread.php?p=41402741

One I tried was originally by wanam Sir.

Another by him but On his new thread.

Sir,

Technically I am zero. I don't have any knowledge On IT, Java or any other computer related things.

I'm not from this industry even. I'm from hardcore management stream.

I succeed in everything on trial & Error method. And all my mods are based On that.

But I'll give it a try. And will let you know.

""Hitting Thanks Don't Cost You Anything, then, Why You All Are Getting Bothered in Doing So. Hitting Thanks Increases My Motivation to Work for this Community....:):):)""
[Android Themes] thirdzcee:
I'm from medical field... Hahaha.. Learned via the same method as you did plus a little help from Google and some helpfuld devs gonna give this a try tommorow as I'm beat right now, its already 2 am in my country

---------- Post added at 08:14 PM ---------- Previous post was at 08:10 PM ----------

Thanks for the tip, just wanted to give it a try again as I already tried before but I was still uber noob that time, all I knew was to just copy paste:D, I think now I'm more capable than I was before...

EDIT: coincidence on the link you gave me, I was just viewing that a while ago :thumbup::thumbup:
[Android Themes] :
I'm on all these kinda guides and subscribed to it as well.

Ok good night brother. Btw you can also visit my theming guide from my signature.

If succeed just do let its know as well.

:p:D:):):):)

""Hitting Thanks Don't Cost You Anything, then, Why You All Are Getting Bothered in Doing So. Hitting Thanks Increases My Motivation to Work for this Community....:):):)""
[Android Themes] :
[MENTION=3862405]SpaceCaker[/MENTION] Sir.

Sir i got this error while i want to attach the toolbar view in quickspace.xml.....

Please have look into it....

E/AndroidRuntime( 447): FATAL EXCEPTION: main

E/AndroidRuntime( 447): java.lang.NullPointerException

E/AndroidRuntime( 447): at com.android.systemui.statusbar.toolbar.ToolBarView.isStatusBarExpanded(ToolBarView.java:809)

E/AndroidRuntime( 447): at com.android.systemui.statusbar.toolbar.ConnectionSwitchPanel$1.handleMessage(ConnectionSwitchPanel.java:168)

E/AndroidRuntime( 447): at android.os.Handler.dispatchMessage(Handler.java:99)

E/AndroidRuntime( 447): at android.os.Looper.loop(Looper.java:153)

E/AndroidRuntime( 447): at android.app.ActivityThread.main(ActivityThread.java:5086)

E/AndroidRuntime( 447): at java.lang.reflect.Method.invokeNative(Native Method)

E/AndroidRuntime( 447): at java.lang.reflect.Method.invoke(Method.java:511)

E/AndroidRuntime( 447): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)

E/AndroidRuntime( 447): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)

E/AndroidRuntime( 447): at dalvik.system.NativeStart.main(Native Method)
[Android Themes] SpaceCaker:
E/AndroidRuntime( 447): java.lang.NullPointerException

E/AndroidRuntime( 447): at com.android.systemui.statusbar.toolbar.ToolBarView.isStatusBarExpanded(ToolBarView.java:809)

E/AndroidRuntime( 447): at com.android.systemui.statusbar.toolbar.ConnectionSwitchPanel$1.handleMessage(ConnectionSwitchPanel.java:168)

these are the faults

google bit more about nullpoint exception and checm the smalis at those stufe
[Android Themes] thirdzcee:
Seems the stock toggles are giving you trouble, if you want I can share my gemini _statusbar_expanded as well.. I had these errors before but after so many times of starting over I forgot how I fixed them, but one thing I learned is you can't delete frame layout of toolbar view or any of its includes, the linear layout of notification text view, the carrier labels and I can't remember all but the idea is don't delete any of the lines to be safe, just hide them with either android:visibility="invisible" or 0.0dip for layoutwidth and height
[Android Themes] :
Broda,

I also have done same. But then also same problem. Need to understand this. And the hell is than even I'mm not able to Google it to get a solution.

Sir,

I too figured it out. But not able to find the solution.

Yes one more thing in the mean while,

The SystemUI closes only when I'm enabling the data from the toggles. Other than this all function are working properly, Bluetooth, Wi-Fi, GPS. Everything is working.

The . Handle message error is related to Data only sir. I figured this out too.

Now please help.

What I created is in screen shots. So don't want to lose that.

""Hitting Thanks Don't Cost You Anything, then, Why You All Are Getting Bothered in Doing So. Hitting Thanks Increases My Motivation to Work for this Community....:):):)""
[Android Themes] akash akya:
I also trying to add toolbar + close notification on tap.... but its bit difficult to change id n png... actually Im making virtual toolbar ;D .....

BTW I succeeded removing airplane mode from toolbar, a week ago, now you won't tap in airplane mode in hurry.....

If there the was source work would be easier... :\

---------- Post added at 10:19 AM ---------- Previous post was at 09:33 AM ----------

its very off topic here to post and discuss regarding MTK devices here, so i started new thread...

start discussion here,

http://xdaforums.com/showthread.php?p=43736272#post43736272
[Android Themes] :
Brother,

Will you help Me in solving those problem coz, I'm not able find a solution for it.

Just few post back by error log is there.

Please help in this as well,I know you have good knowledge in doing this.

""Hitting Thanks Don't Cost You Anything, then, Why You All Are Getting Bothered in Doing So. Hitting Thanks Increases My Motivation to Work for this Community....:):):)""
[Android Themes] jatin3:
hy i try it for my ace plus 7 times but not success i upload my systemui pls port it :confused::mad:
[Android Themes] Akash sky:
tireddd of trying

tried so many tym but alwayz recomiling error :9..

anybody successfully install it on galaxy y duos ???
[Android Themes] SpaceCaker:
logcat ;)
[Android Themes] Akash sky:
logcat??? i dnt undrstnd:( newbies:(
[Android Themes] SpaceCaker:
then i am affraid to say that this mod will be to hard for u ;)

atleast u must know logcat and xml before u gonna try this

sorry

but also without logcat i wont be of any help because without i have no idea whats going on.
[Android Themes] Akash sky:
i got it ill snd logcat 2morrow :)
[Android Themes] thinkfreedom:
can you share your moded apk!!
[Android Themes] Akash sky:
bro i tried to learn about logcat

got some info:)

i hv dwnload alogcat app from playstore nw anybody tell me dat wat should i do nw???plzz its urgent
[Android Themes] Erhany:
finally I ported toggles from top and put them in rows.. Thank you again SpaceCaker..
[Android Themes] akash akya:
if you explain little bit about how you made toggles in rows it will be very helpful....
[Android Themes] SpaceCaker:
modify powerwidget.smali

add mlinearlayoutrows ;)

qnd the linearlayout lines

it is harder then u expect
[Android Themes] akash akya:
thanks lot :):) .... can you give me any working powerwidget.smali which have this mod (row toggles..) ?

so that i can compare and try to edit....:o
[Android Themes] yazidkucrit:
this link to download my moded systemui include edt tweks,battery bar setting, jellybean full expanded, and etc,, don't copy paste please compare it

https://www.dropbox.com/s/xmzgua8nw1a00rl/update-justunbean-v3.7z

and this 2nd version moded systemUI

-include setting to change image and name profile

-15 toogle

see my attach for screenshot
[Android Themes] x-dira:
plzz....port to cm7

Thanks
[Android Themes] thinkfreedom:
Thanks man, that was fast :good: .

I tried moding with the [MENTION=3862405]SpaceCaker[/MENTION] main mod guide but those sentences confused me.Someone please explain this. Can't we just increment the hex values for those two drawables at the end of public.xml?
[Android Themes] binhdb:
I want it
[Android Themes] nhymxu:
Nice guide. Thanks you
[Android Themes] :
Nope. It has to be done with separate tutorial. Thanks to SpaceCaker sir.

This one.....

http://xdaforums.com/showthread.php?p=44066334

""Hitting Thanks Don't Cost You Anything, then, Why You All Are Getting Bothered in Doing So. Hitting Thanks Increases My Motivation to Work for this Community....:):):)""
[Android Themes] dadroid98:
Help me

this is my logcat ---->
[Android Themes] SpaceCaker:
r[COLOR="Red"]es\drawable-mdpi\status_bar_close_on.png:0: error: Resource entry status_bar_cl
ose_on is already defined.
res\drawable-mdpi\status_bar_close_on.9.png:0: Originally defined here.[/COLOR]
C:\Android\apktool\SystemUI\res\values\styles.xml: 3: error: Error retrieving par
ent for item: No resource found that matches the given name '@android:style/Text
Appearance.StatusBar'.
C:\Android\apktool\SystemUI\res\values\styles.xml: 4: error: Error: No resource f
ound that matches the given name: attr 'android:textAppearance'.
C:\Android\apktool\SystemUI\res\values\styles.xml: 6: error: Error: No resource f
ound that matches the given name: attr 'android:textColor'.
C:\Android\apktool\SystemUI\res\values\styles.xml: 5: error: Error: No resource f
ound that matches the given name: attr 'android:textStyle'.
C:\Android\apktool\SystemUI\res\values\styles.xml: 16: error: Error retrieving pa
rent for item: No resource found that matches the given name '@android:style/Tex
tAppearance.StatusBar'.
C:\Android\apktool\SystemUI\res\values\styles.xml: 8: error: Error retrieving par
ent for item: No resource found that matches the given name '@*android:style/Wid
get.Button'.
C:\Android\apktool\SystemUI\res\values\[COLOR="Red"]styles.xml: 12:[/COLOR] error: Error: No resource
found that matches the given name[COLOR="Red"]: attr 'android:background'.[/COLOR]
C:\Android\apktool\SystemUI\res\values\styles.xml: 14: error: Error: No resource
found that matches the given name: attr 'android:clickable'.
C:\Android\apktool\SystemUI\res\values\styles.xml: 13: error: Error: No resource
found that matches the given name: attr 'android:focusable'.
C:\Android\apktool\SystemUI\res\values\styles.xml: 11: error: Error: No resource
found that matches the given name: attr 'android:gravity'.
C:\Android\apktool\SystemUI\res\values\styles.xml: 9: error: Error: No resource f
ound that matches the given name: attr 'android:textAppearance'.
C:\Android\apktool\SystemUI\res\values\styles.xml: 10: error: Error: No resource
found that matches the given name: attr 'android:textColor'.

double pngs and no resooufces found ?
[Android Themes] SpaceCaker:
No such resource found for com.android.systemui:drawable/ic_statusbar_na_upac_top ( missing png )

7-31 16:48:40.343 2264:0x8d8 E/AndroidRuntime ]

FATAL EXCEPTION: main

[COLOR="red"]java.lang.RuntimeException: Unable to create service com.android.systemui.statusbar.StatusBarService: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.[/COLOR]

at android.app.ActivityThread.handleCreateService(ActivityThread.java:2076)

at android.app.ActivityThread.access$2500(ActivityThread.java:123)

at android.app.ActivityThread$H.handleMessage(ActivityThread.java:993)

at android.os.Handler.dispatchMessage(Handler.java:99)

at android.os.Looper.loop(Looper.java:130)

at android.app.ActivityThread.main(ActivityThread.java:3835)

at java.lang.reflect.Method.invokeNative(Native Method)

at java.lang.reflect.Method.invoke(Method.java:507)

at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)

at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)

at dalvik.system.NativeStart.main(Native Method)

[COLOR="Red"]Caused by: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.[/COLOR]

at android.view.ViewGroup.addViewInner(ViewGroup.java:1976)

at android.view.ViewGroup.addView(ViewGroup.java:1871)

at android.view.ViewGroup.addView(ViewGroup.java:1828)

at com.android.systemui.statusbar.StatusBarService.updateLayout(StatusBarService.java:506)

at com.android.systemui.statusbar.StatusBarService.makeStatusBarView(StatusBarService.java:461)

at com.android.systemui.statusbar.StatusBarService.onCreate(StatusBarService.java:285)

at android.app.ActivityThrea
[Android Themes] cleverior.ipul:
wow... will try it tonight. thanks (y)
[Android Themes] aldzi:
my logcat,i also didnt find "status_bar_date_formatter" , you can check my string in attachment
[Android Themes] dadroid98:
How to fix , i'm not able :/

thanks so much man !

drawable/ic_statusbar_na_upac_top not found ....??
[Android Themes] kk9999gada:
Not Displaying Bottons

I tried porting and got success half way.

Please Help:

The Problem is When I open Quick Settings it shows only recent apps button and settings button. And in that Settings button is working and Recent Apps is working.

See Attachments
[Android Themes] whalesplaho:
i wanna try dis on JB+Xperia.... please any guide OP?

thanks for dis great tut.
[Android Themes] SpaceCaker:
follow the JB guide ;)
[Android Themes] whalesplaho:
dont know where to get dat... please help!!!!

thanks for been there for me while using Xperia P!:highfive:
[Android Themes] SpaceCaker:
press my account

then show all threads