5,596,235 Members 35,123 Now Online
XDA Developers Android and Mobile Development Forum

[MOD][HOW-TO] Add Flashlight quick toggle [4.3|4.4]

Tip us?
 
Netuser
Old
#251  
Senior Member
Thanks Meter 257
Posts: 869
Join Date: Feb 2006
Location: Montreal
@CNexus

I searched by image id and find this in Quicksetting button that refer to that image which is the Thicker underline : Can i comment or edit any part to make it not load the underline ? What about the thinner underline which is not part of any image, dont know from where it is coming
Code:
    .line 285
    iget-object v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;->mBtnLED:Landroid/widget/ImageView;

    const v1, 0x7f0201a1

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V
Samsung Galaxy S4 (SGH-M919V)

Phone devices used in the past:
Xperia ZL
LG Optimus 2x P990
iPhone 3gs, 3g, 2g
Qtek S110 & S110
SE K800i & K750 & Z700
Nokia 6230 & 8210
+many others

 
CNexus
Old
#252  
CNexus's Avatar
Recognized Contributor - OP
Thanks Meter 11052
Posts: 8,403
Join Date: May 2012
Location: /home/cnexus/android

 
DONATE TO ME
Place this code immediately after the setImageResource line

Code:
const v1, 0x8
invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V
Sign up for the new Copy file storage service with this link and get both of us an extra 5 GB!
Or sign up for Dropbox with this link and we can both grab some extra storage!

The Following User Says Thank You to CNexus For This Useful Post: [ Click to Expand ]
 
Netuser
Old
(Last edited by Netuser; Today at 04:08 AM.)
#253  
Senior Member
Thanks Meter 257
Posts: 869
Join Date: Feb 2006
Location: Montreal
Quote:
Originally Posted by CNexus View Post
Place this code immediately after the setImageResource line

Code:
const v1, 0x8
invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V
Thanks Ok I will try it now, But i posted the wrong code that was for dim image

Here is the On and Off bottom bar image id that are all together :

Code:
.method public setActivateStatus(I)V
    .locals 4
    .parameter "activateStatus"

    .prologue
    const v3, 0x7f02022a

    const v2, 0x7f02022b

    .line 245
    iput p1, p0, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;->mActivateStatus:I

    .line 247
    iget v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;->mTextID:I

    if-eqz v0, :cond_0


---------- Post added at 10:51 PM ---------- Previous post was at 10:31 PM ----------


@CNexus YESSS You are Amazing it worked here is the code I put as you told but after v2 and v3 But now I still have that 2nd thin line left How to get rid of that now (screenshot added, think line gone thin one is still here )?

Code:
    invoke-virtual {v0, v2}, Landroid/widget/ImageView;->setImageResource(I)V
	
	const v2, 0x8
	invoke-virtual {v0, v2}, Landroid/view/View;->setVisibility(I)V

Also I have another question, all my other toggle are not shown by ON and Off image but only 1 image called round at the end of image for exemple : tw_quick_panel_icon_airplane_round.png

Then if I turn on it will show these above mention image on a background image which is : tw_quick_panel_quick_setting_button_round_bg_on.pn g or if it is turn on it will show it on tw_quick_panel_quick_setting_button_round_bg_off.p ng

Is it possible to modify your code to do same with Flashlight meaning I have 1 image called tw_quick_panel_icon_flashlight_round.png that will show on aboive mentioned BG On and Off image instead of different On off image ? : or I am forced to use On and Off image ?

Thanks so much for all your help. I am also learning so much with all these edit
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2014-04-17-23-05-18.png
Views:	10
Size:	208.0 KB
ID:	2693249  
Samsung Galaxy S4 (SGH-M919V)

Phone devices used in the past:
Xperia ZL
LG Optimus 2x P990
iPhone 3gs, 3g, 2g
Qtek S110 & S110
SE K800i & K750 & Z700
Nokia 6230 & 8210
+many others

Tags
4.3, flashlight, flashlight toggle, quick toggle, toggle
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes