Christian ported this keyboard to S2 but this is a how to do it yourself, prepared it from scratch after a lot of research
1) Extract SamsungIME.apk from the ROM that you prefer that has the default S2 Samsung keyboard
2) decompile the apk
3) in the extracted/decompiled folder, browse to res\xml-sw320dp-hdpi\properties.xml
4) search for the following line and change the value to "true" as seen below
<Property key="USE_ADDTO_NUMBER_KEY_FIRST_LINE" value="true" type="bool" />
5) add the following line at the bottom of the same file
<Property key="NOTE_KEYPAD_TYPE" value="true" type="bool" />
6) next browse to /res/xml-sw320dp-hdpi/qwerty_en.xml and add the following code at the top. Blue color code is what was added to the top to add the numeric row. Modified file attached.
<Row android:keyHeight="0.0px" android:horizontalGap="0.0px" android:verticalGap="@dimen/qwerty_first_line_vertical_gap">
<Key android:keyWidth="100.0%p" android:codes="-257" android:keyLabel="StrEmpty" />
</Row>
<Row android:keyHeight="@dimen/qwerty_number_key_height" android:rowEdgeFlags="top">
<Key android:horizontalGap="@dimen/qwerty_first_col_horizontal_gap" android:codes="0x31" android:keyEdgeFlags="left" android:keyLabel="1" />
<Key android:codes="0x32" android:keyLabel="2" />
<Key android:codes="0x33" android:keyLabel="3" />
<Key android:codes="0x34" android:keyLabel="4" />
<Key android:codes="0x35" android:keyLabel="5" />
<Key android:codes="0x36" android:keyLabel="6" />
<Key android:codes="0x37" android:keyLabel="7" />
<Key android:codes="0x38" android:keyLabel="8" />
<Key android:codes="0x39" android:keyLabel="9" />
<Key android:codes="0x30" android:keyEdgeFlags="right" android:keyLabel="0" />
</Row>
<Row>
<Key android:horizontalGap="@dimen/qwerty_first_col_horizontal_gap" android:codes="113" androidopupCharacters="@string/default_umlaut_q" android:keyEdgeFlags="left" android:keyLabel="q" />
<Key android:codes="119" androidopupCharacters="@string/default_umlaut_w" android:keyLabel="w" />
<Key android:codes="101" androidopupCharacters="@string/default_umlaut_e" android:keyLabel="e" />
<Key android:codes="114" androidopupCharacters="@string/default_umlaut_r" android:keyLabel="r" />
<Key android:codes="116" androidopupCharacters="@string/default_umlaut_t" android:keyLabel="t" />
<Key android:codes="121" androidopupCharacters="@string/default_umlaut_y" android:keyLabel="y" />
<Key android:codes="117" androidopupCharacters="@string/default_umlaut_u" android:keyLabel="u" />
<Key android:codes="105" androidopupCharacters="@string/default_umlaut_i" android:keyLabel="i" />
<Key android:codes="111" androidopupCharacters="@string/default_umlaut_o" android:keyLabel="o" />
<Key android:codes="112" androidopupCharacters="@string/default_umlaut_p" android:keyEdgeFlags="right" android:keyLabel="p" />
</Row>
7) most of the ported keyboards did not have 5 rows in the symbols page. I preferred to match 5 rows on the symbols page like the note keyboard. So, I had to make changes to qwerty_number_symbols.xml file. I remapped the keys and hence attached xml file to the post.
8) Finally I preferred to increase the height of the numeric keys and so I change "qwerty_number_key_height" in dimens.xml to 48 from default value of 31 or 32
I change it both under \res\values\dimes.xml and also \res\values-sw320dp-hdpi\dimes.xml
9) decompile back the apk and then replace the original file with the modified apk file in \preload...\app\
Note: these are the steps to be performed to English language keyboard. For other languages, you need to edit the corresponding qwerty_xx.xml and qwerty_number_symbols_xx.xml file. Thanks to Christian for highlighting this.
Hoping not to missed anything. Got ideas from Korean website.
http://www.matcl.com/?m=bbs&bid=usermoim&cat=팁&uid=191755
josephpatrick said:
Christian ported this keyboard to S2 but this is a how to do it yourself, prepared it from scratch after a lot of research
1) Extract SamsungIME.apk from the ROM that you prefer that has the default S2 Samsung keyboard
2) decompile the apk
3) in the extracted/decompiled folder, browse to res\xml-sw320dp-hdpi\properties.xml
4) search for the following line and change the value to "true" as seen below
5) add the following line at the bottom of the same file
6) next browse to /res/xml-sw320dp-hdpi/qwerty_en.xml and add the following code at the top. Blue color code is what was added to the top to add the numeric row. Modified file attached.
7) most of the ported keyboards did not have 5 rows in the symbols page. I preferred to match 5 rows on the symbols page like the note keyboard. So, I had to make changes to qwerty_number_symbols.xml file. I remapped the keys and hence attached xml file to the post.
8) Finally I preferred to increase the height of the numeric keys and so I change "qwerty_number_key_height" in dimens.xml to 48 from default value of 31 or 32
I change it both under \res\values\dimes.xml and also \res\values-sw320dp-hdpi\dimes.xml
Click to expand...
Click to collapse
josephpatrick said:
9) decompile back the apk and then replace the original file with the modified apk file in \preload...\app\
Hoping not to missed anything. Got ideas from Korean website.
http://www.matcl.com/?m=bbs&bid=usermoim&cat=팁&uid=191755
Click to expand...
Click to collapse
Should not we recompile the apk at last?
BTW nice guide
Sent from my GT-I9100 using Tapatalk 2
corruptionfreeindia said:
[/hide]
Should not we recompile the apk at last?
BTW nice guide
Sent from my GT-I9100 using Tapatalk 2
Click to expand...
Click to collapse
Corrected, thanks
Good job with the guide mate
But don't forget to type that they need to edit all the remaining querty_xx.xml (xx is the abbreviated language) or to edit their favorite language
Good job once again , I was too lazy to start making a guide for the extra row with the numbers
Sent from my PMP5880D using Tapatalk Pro v4
Touchwiz Independent
How to make it independent from Touchwiz or Samsung Firmware? In other words how to make it work on AOSP and other ROMs variations?
Thanks'
mma173 said:
How to make it independent from Touchwiz or Samsung Firmware? In other words how to make it work on AOSP and other ROMs variations?
Thanks'
Click to expand...
Click to collapse
Does not seem possible because of the Samsung framework
Thanks for very useful guide. I could edit the code and got number row working on my Samsung default keyboard on Galaxy S3 Korean variant. I was looking for this guide from many days. Thanks again bro.
One thing, there are no keys beneath the number rows, can you guide how to add these ? only number rows are seen
Thanks.
kmdangi said:
Thanks for very useful guide. I could edit the code and got number row working on my Samsung default keyboard on Galaxy S3 Korean variant. I was looking for this guide from many days. Thanks again bro.
One thing, there are no keys beneath the number rows, can you guide how to add these ? only number rows are seen
Click to expand...
Click to collapse
You might want to check "sip_key_bg_number.9.png" and "sip_key_bg_number_qwerty.9.png" under res\drawable-sw3**** folders. For landscape layout, you need to also make changes in folder "res\drawable-sw***-land***" folders
josephpatrick said:
You might want to check "sip_key_bg_number.9.png" and "sip_key_bg_number_qwerty.9.png" under res\drawable-sw3**** folders. For landscape layout, you need to also make changes in folder "res\drawable-sw***-land***" folders
Click to expand...
Click to collapse
thanks josephpatrick,
I deleted <Property key="USE_ADDTO_NUMBER_KEY_FIRST_LINE" value="true" type="bool" /> from properties.xml and the problem was solved !!
Can you help me, How to disable the secondary keylabels seen on the number buttons ?
kmdangi said:
thanks josephpatrick,
I deleted <Property key="USE_ADDTO_NUMBER_KEY_FIRST_LINE" value="true" type="bool" /> from properties.xml and the problem was solved !!
Can you help me, How to disable the secondary keylabels seen on the number buttons ?
Click to expand...
Click to collapse
Glad u figured it out. Normally the number row has a different background image/color.
For the symbol part, system/csc/feature.xml ==> remove following lines
<CscFeature_Sip_UseSymbolInCMKey>true</CscFeature_Sip_UseSymbolInCMKey>
<CscFeature_Sip_EnableSymbolInSecondary>de;en_US;en_GB</CscFeature_Sip_EnableSymbolInSecondary>
Use root explorer and edit the file
josephpatrick said:
Glad u figured it out. Normally the number row has a different background image/color.
For the symbol part, system/csc/feature.xml ==> remove following lines
<CscFeature_Sip_UseSymbolInCMKey>true</CscFeature_Sip_UseSymbolInCMKey>
<CscFeature_Sip_EnableSymbolInSecondary>de;en_US;en_GB</CscFeature_Sip_EnableSymbolInSecondary>
Use root explorer and edit the file
Click to expand...
Click to collapse
==============
deleted above lines from feature.xml but the secondary labels on number keys are still present
Note : labels are seen only during alphabet view of keyboard, during symbol view it does not show up.
Related
just played with my HTC touch HD and try to figure it out on how to change the Image Banner/Browser Icon on my Internet Tab....
check this out
http://s157.photobucket.com/albums/t57/butz007/htc%20touch%20hd/?action=view¤t=safari_browser.jpg
how to do it very simple
1. Create an Icon... must be on .PNG (whatever software do you prefer will definitely do as long as the final output would be on Transparent PNG)
note: the size of the PNG icon must be on 480 by 200 pixels, 72 dpi
2. Edit the XML code, don't be afraid this won't bite you (for all the newbs and non-developers)
you could always locate the XML code on this path on your device go to Application\Manila
InternetPortal.xml and InternetPortal-en-AU.xml
copy that and edit it on your desktop computer using a Notepad
note: make sure you have a back-up copy of the original better do this than sorry
then heres the original code just look the following highlighted text this is the one you going to change
***************************
<?xml version="1.0" encoding="utf-16"?>
<InternetPortal>
<IncludeUserFavorites>True</IncludeUserFavorites>
<Banner
DefaultImagePath="\Windows\480x200.qtc"
SelectedImagePath="\Windows\480x200.qtc"
Text="Launch Gee!"
NavigateUrl="http://gee-select.starhubgee.com.sg/wap/"
Width="480"
Height="215" />
<OperatorLinks>
<Link
Text="YouTube"
Executable="\windows\youtube.exe"
ImagePath="\Windows\HTC\Assets\Images\InternetPortal\youtube.qtc" />
</OperatorLinks>
</InternetPortal>
*******************************************
the first two highlighted text where the image path and the filename of icon that you just created... OK!?
example
DefaultImagePath="\Windows\myicon.png"
SelectedImagePath="\Windows\myicon.png"
second, I'm using a Blackstone that i bought in singapore so theres starhub logo and starhub link there so I've really don't know on your devices if were both the same but i think all htc devices were all the same when it comes to firmware.. so next on my device I got a welcome text
example
Text="Launch achu chu chu etc etc...or welcome to my world!"
Third Highlighted Text is the link of your banner
Whatever Link you may think that you usually go so often using your device
NavigateUrl="http://playboy.com"
and then FINALLY
copy this the two edited xml file and overwrite it on you devices, same path ofcourse.....Application\Manila, using Total Commander
then put your created art (PNG) on the main windows folder and viola, your personalized Internet Tab.......
...............................................................................
LIKE it..LOVE it.. HATE IT.. WHATEVER!! just enjoy it! ...
I've been MOD'ing .apk files reciently (usually changing 1-3 .xml file edits to add mod's to newer UVDLJC files...
After using Apktool to decompress .apk's
I noticed in ALL apk's res\values\bools.xml (looks like you can add lines or change things)
also while looking at Settings /data/data folders (most .xml files use example below)
<boolean name="lock_sounds" value="false" />
<boolean name="haptic_feedback" value="true" />
<boolean name="dualclock_settings" value="false" />
<boolean name="assisted_gps" value="false" />
<boolean name="allow_mock_location" value="true" />
boolean sounds similiar to bools.xml
Can settings be added there ? If not, where ?
I'd love to change many default settings (get rid of 1st prompts) and customize stuff
any advice would be great!
I do pleanty of CSC codes and get that
I've tried many times to add data\data\ folder setting changes and changed permissions (but apps always over write my custom settings)
-this sometimes works if i do it manually and set permissions, but not from flashing in recovery!
To convert any text button like "send" button in stock Mms.apk into an image button as in hyperion Mms.apk.
-- You do not need to rewrite the whole line of code regarding that button's attributes
--Simply know that every text button has images associated that form background of text that can be altered to get the Images we want.
--But how do we remove text from button
--Here I shall show you how to do that for send button Mms.apk,, you can use that for any text button
1) Decompile Mms.apk
2) open compose_message_activity.xml in res/layout
3) find and remove
<Button android:textSize="16.0sp" android:textColor="@drawable/selector_send_btn_text_color" android:id="@id/send_button" android:background="@drawable/selector_send_button" android:nextFocusLeft="@id/embedded_text_editor" android:layout_width="55.0dip" android:layout_height="48.0dip" android:layout_marginBottom="3.2999878dip" android:text="@string/send" />
and paste another linear layout below that linear layout as
<LinearLayout android:gravity="center" android:layout_gravity="center_vertical" androidrientation="vertical" android:id="@id/sendbuttons" android:layout_width="48.0dip" android:layout_height="wrap_content" android:layout_marginLeft="4.0dip"> <Button android:textSize="5.0sp" android:textColor="#00000000" android:id="@id/send_button" android:background="@drawable/selector_send_button" android:nextFocusLeft="@id/embedded_text_editor" android:layout_width="48.0dip" android:layout_height="48.0dip" android:text="x" /> </LinearLayout>
(no need to delete send from strings.xml)
4) open the xml in bold italic part in the above code
5) note the names of pngs in it and replace accordingly,,, like
---a bright png for default and a dark png for android:state pressed="true"---, etc
6) Recompile and done
{the same principle can be extended to all text buttons and convert to image buttons}
[[[[[[[[[[[[[[[[[[[though unnecessary ,, if you want to totally remove the text attributes and rewrite as image button,, use this
<ImageButton android:gravity="<ur wish>" android:layout_gravity="<ur wish>" android:id="@id/<id name of it>" android:background="@drawable/<ur wish>" android:layout_width="<ur wish>" android:layout_height="<ur wish" />
for certain places,, u need other attributes in it as
android:nextFocusLeft="@id/<ur wish>" android:layout_width="<ur wish dip>"
add that using common sense]]]]]]]]]]]]]]]]]]
-------------------------------PRESS THANKS IF I HELPED YOU OR INCREASED YOUR KNOWLEDGE------------------------------------------------------------------:good:
LIKE THIS!!!!!!!!!!!
look at the send button and u will know what this mod does perfectly
Hi
I found the simple way to change the icons and names of applications on Samsung's TouchWiz UI.
you need to know about how to edit an apk and also how to find the application's package and activity names.
0-Download my attached file.
1-Decompile CSCAppResource.apk
2-add all your favorite icons to drawable folder.
2a= if you want to change the application's name too, check this post! [updated 1st august 2013 ]
3-Compile and Sign it.
already , you have CSCAppResource.apk with all icons , you added from above steps.
now , you need to decompile your edited CSCAppResource.apk file, after decompiling, goto Values folder and open the public.xml file vith Notepad++.
now you will find it like this one,, this is an example;
PHP:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<public type="drawable" name="amestris_test" id="0x7f020000" />
</resources>
------------------------------------------------------
4-now create a xml file and paste below lines into it.
PHP:
<?xml version="1.0"?>
<cscappresource>
</cscappresource>
save it with CSCAppResource.xml file name.
------------------------------------------------------
5-now we want to add Icon for specific application. for example we want to change the icon for Browser.
the Browser application activity name is " com.android.browser ".
now we will define the Icon for Browser activity. see below example.
back to "CSCAppResource.xml" file and add this line between cscappresource tag.
PHP:
<item name="com.android.browser" iconid="7f020000"/>
at final we have the "CSCAppResource.xml " like this one.
PHP:
<?xml version="1.0"?>
<cscappresource>
<item name="com.android.browser" iconid="7f020000"/>
</cscappresource>
--------------------------------------------
save the file and copy CSCAppResource.xml and CSCAppResource.apk to this folder:
Code:
/system/csc/appresource
** you need to create "appresource" folder, if not exists.
give permissions to folder and files then reboot your phone.
i will share some samples in post #two.
Best Regards.
original thread
http://www.pda-planet.com/forum/forum127/thread5929.html
CUSTOM ICON PACKS
1-Sence5 Icon Pack by wildstang83--------------------------------------------------------
How to apply this iconpack from custom recovery mod? [CWM Update.zip file]
Download the attached file "IconPack_Sample_CWM.zip"
Extract it via WinRar or 7Zip, copy your edited files into " \system\csc\appresource" folder and zip it.
now you can install it from recovery.
it is compatible with all phones.
**custom recovery is need.
--------------------------------------------------------
Icon Pack Convertor by LegendM
Click to view the post
--------------------------------------------------------
This is an sample:
PHP:
<?xml version="1.0"?>
<cscappresource>
<item name="com.android.browser" iconid="7f020012"/>
<item name="com.android.settings" iconid="7f02004f" />
<item name="com.android.phone" iconid="7f020046" />
<item name="com.android.mms" iconid="7f02003a" />
<item name="com.android.email" iconid="7f02001d" />
<item name="com.android.providers.downloads.ui" iconid="7f02001c" />
<item name="com.android.provider.smemo" iconid="7f020045" />
<item name="com.sec.android.widgetapp.diotek.smemo" iconid="7f020045" />
<item name="com.android.contacts" iconid="7f020018" />
<item name="com.android.contacts.activities.DialtactsActivity" iconid="7f020046" />
<item name="com.android.contacts.activities.PeopleActivity" iconid="7f020018" />
<item name="com.sec.android.app.dialertab.calllog.CalllogTipsActivity" iconid="7f020034" />
<item name="com.sec.android.app.camera" iconid="7f02000f" />
<item name="com.sec.android.app.camera.Camera" iconid="7f02000f" />
<item name="com.sec.android.gallery3d" iconid="7f020024" />
<item name="com.sec.android.app.launcher" iconid="7f020003" />
<item name="com.sec.android.app.controlpanel" iconid="7f02002e" />
<item name="com.sec.android.app.videoplayer" iconid="7f02005d" />
<item name="com.sec.android.app.voicerecorder" iconid="7f020061" />
<item name="com.sec.android.app.music" iconid="7f02003f" />
<item name="com.sec.android.app.myfiles" iconid="7f02001f" />
<item name="com.sec.android.app.fm" iconid="7f020021" />
<item name="com.sec.android.app.popupcalculator" iconid="7f020008" />
<item name="com.sec.android.app.clockpackage" iconid="7f020015" />
<item name="com.android.vending.AssetBrowserActivity" iconid="7f02004a" />
<item name="com.android.vending" iconid="7f02004a" />
<item name="com.google.android.finsky.widget.recommendation.RecommendedWidgetProvider" iconid="7f02004a" />
<item name="com.google.android.finsky.FinskyApp" iconid="7f02004a" />
<item name="com.android.vending.MarketWidgetProvider" iconid="7f02004a" />
<item name="com.google.android.finsky.widget.consumption.NowPlayingWidgetProvider" iconid="7f02004a" />
<item name="com.opera.mini.android" iconid="7f020043" />
<item name="com.noshufou.android.su" />
<item name="com.sds.android.ttpod" iconid="7f020059" />
<item name="net.cactii.flash2" iconid="7f020020" />
<item name="com.android.calendar.launchactivity" iconid="7f02000b" />
<item name="com.android.calendar.LaunchActivity" iconid="7f02000b" />
</cscappresource>
I have a couple of quick questions first though. Does it matter what the icons are named? Like ic_launcher.png, etc...
Also, I see where you say place both the .apk and the .xml into /system/csc/appresource, but I don't have an appresource folder on my Note II. What should I do?
Looks interesting, can't wait to try it out after your reply
wildstang83 said:
I have a couple of quick questions first though. Does it matter what the icons are named? Like ic_launcher.png, etc...
Also, I see where you say place both the .apk and the .xml into /system/csc/appresource, but I don't have an appresource folder on my Note II. What should I do?
Looks interesting, can't wait to try it out after your reply
Click to expand...
Click to collapse
1- it doesn't matter about the names, you just link the icon's ID from public.xml to activity. also you can see the example from second post.
2-you need to create appresource folder manually, it doesn't exists on any firmware.
M_J_Nazari said:
1- it doesn't matter about the names, you just link the icon's ID from public.xml to activity. also you can see the example from second post.
2- if not exists , then create appresource folder manually.
Click to expand...
Click to collapse
Appreciate that. Gonna try it out right now :good:
wildstang83 said:
Appreciate that. Gonna try it out right now :good:
Click to expand...
Click to collapse
you're welcome , you can test the sample from second post.
M_J_Nazari said:
you're welcome , you can test the sample from second post.
Click to expand...
Click to collapse
Yea thats what I am doing, just having a look at how you did it and everything. It works btw. You did a good job with this bud.
EDIT: I have the VZW Samsung Galaxy Note II i605 and it works perfectly.
Trust me I'm searching for this long time
I try create an small windows app that read apex ,go launcher icons and convert them to touchwiz
wildstang83 said:
Yea thats what I am doing, just having a look at how you did it and everything. It works btw. You did a good job with this bud.
EDIT: I have the VZW Samsung Galaxy Note II i605 and it works perfectly.
Click to expand...
Click to collapse
:good: its my pleasure.
LegendM said:
Trust me I'm searching for this long time
I try create an small app that read apex ,go launcher icons and convert them to touchwiz
Click to expand...
Click to collapse
I'll hope you find it perfect.
we are waiting for your job.
i searching a long time for this method and finally find this way is working. it seems an hidden Touchwiz feature.
Edit:Here you go small tool ( may be buggy,report bugs via pm)
LegendM said:
Ok,I made a small app,It extract apk files
Read from xml file and create new one
Now main problem is how can I sign zip?
Click to expand...
Click to collapse
how you edit apk file?
How to setup APKTool & Decompile, Recomile, Sign, and Zipalign APKs
[Guide] [Apktool] [Drag2sign] guide for decompiling apks to edit xml files & sign apk
[GUIDE] Signing and zipaligning your app
LegendM said:
Ok,I made a small app,It extract apk files
Read from xml file and create new one
Now main problem is how can I sign zip?
Click to expand...
Click to collapse
Basically you will need to create a key to sign the apk with. Assuming you have the android sdk and the JDK installed and in your path, you need to open terminal and run a command to create a key:
Code:
keytool -genkey -v -keystore android-test.keystore
Now that that is created you need to create a directory in which to sign your apk. I created mine on my desktop and called it sign_apk. So then I moved my key to that sign_apk folder on my desktop, along with my unsigned apk. After that you need to run another terminal command to sign the apk:
Code:
cd [path to sign_apk]
jarsigner -verbose -keystore android-test.keystore CSCAppResource.apk mykey
It will ask for the password you used while you were setting up your key. After you enter your password, it will sign the apk and all will be good.
Keep in mind, I am an OSX user so certainly not all things may be the same for all users, but this should get you closer at least
wildstang83 said:
Basically you will need to create a key to sign the apk with. Assuming you have the android sdk and the JDK installed and in your path, you need to open terminal and run a command to create a key:
Code:
keytool -genkey -v -keystore android-test.keystore
Now that that is created you need to create a directory in which to sign your apk. I created mine on my desktop and called it sign_apk. So then I moved my key to that sign_apk folder on my desktop, along with my unsigned apk. After that you need to run another terminal command to sign the apk:
Code:
cd [path to sign_apk]
jarsigner -verbose -keystore android-test.keystore CSCAppResource.apk mykey
It will ask for the password you used while you were setting up your key. After you enter your password, it will sign the apk and all will be good.
Keep in mind, I am an OSX user so certainly not all things may be the same for all users, but this should get you closer at least
Click to expand...
Click to collapse
Check my post and report bugs please :laugh:
I skip sign zip,people can do that manually,it just create xml file
LegendM said:
Edit:Here you go small tool ( may be buggy,report bugs via pm)
Click to expand...
Click to collapse
could you please explain it better?
it will convert icon packs from another Launchers to Touchwiz?
:good::good::good::good::good: yaaaay amazing guide bro
Got my Note ll looking like Sense 5
M_J_Nazari said:
could you please explain it better?
it will convert icon packs from another Launchers to Touchwiz?
Click to expand...
Click to collapse
Yep
You have to read other launcher apk file
It automaticly read xml file and create new one for touchwiz
Also you can find extracted apk file in my documents/touchwiz icon converter folder
LegendM said:
Yep
You have to read other launcher apk file
It automaticly read xml file and create new one for touchwiz
Also you can find extracted apk file in my documents/touchwiz icon converter folder
Click to expand...
Click to collapse
its an amazing tool :X:good:
Good,
Work perfec in s3mini
Sent from my GT-I8190 using Xparent Blue Tapatalk 2
this is the easiest apk decompiler i know as of now
http://www.youtube.com/watch?v=5-u0UI9LsrY
Brightness Slider Guide
For CM11 See My Guide - Here
I have re-written the guide by @evanlocked with his permission as some people had trouble following his guide so I'll try to make it simple to follow steps
Full credit goes to him for the original guide and steps - All I have done is present it and re-write it in a different way to make it more understandable and iv also added steps for different layouts depending on what rom you are using
The original thread can be found
http://forum.xda-developers.com/showthread.php?t=2152370
1 - Download the attachment and unzip the folder
2 - Decompile your SystemUI.apk with apktool
3 - Open the downloaded attachment and copy the files within to the following locations to your decompiled SystemUI folder
Note if you dont have the folder for the smali eg lidroid just create it
smali\com\lidroid\systemui\quickpanel
BrightnessSlider$BrightnessSettingsObserver.smali
BrightnessSlider.smali
smali\com\android\systemui\statusbar
SlideBrightness$1.smali
SlideBrightness$2.smali
SlideBrightness.smali
smali\com\android\systemui\statusbar\quickpanel
BrightnessSettingsView$1.smali
BrightnessSettingsView$AutomaticObserver.smali
BrightnessSettingsView$BrightnessObserver.smali
res\drawable
brightness_seekbar.xml
res\layout
qp_brightness.xml
quickpanel_brightness_settings.xml
res\drawable-ldpi (or -mdpi and so on depending on your phone res)
brightness_bg.png
ic_brightness.png
quickpanel_brightness_icon.png
4 - Open res/values/strings.xml with notepad++
above </resources> place the following
Code:
<string name="brightness_settings_title" />
<string name="brightness_settings_automatic" />
5 - Open res/values/ids.xml with notepad++
above </resources> place the following (note cm9 dont add <item type="id" name="brightness">false</item> as its already defined)
Code:
<item type="id" name="title">false</item>
<item type="id" name="brightness">false</item>
<item type="id" name="automatic">false</item>
6 - Open res/layout/status_bar_expanded.xml
This step will vary depending on rom so I will give a few examples
Example 1 - Stock Gingerbread (deodexed)
Under
Code:
<com.android.systemui.statusbar.NotificationLinearLayout android:orientation="vertical" android:id="@id/notificationLinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="6.0dip">
Place
Code:
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<include layout="@layout/qp_brightness" />
</LinearLayout>
Example 2 - CM7
If you have a header you can place it under it like this (note your header name maybe different from StatusBarJellyHeaderView)
Under
Code:
<com.android.systemui.statusbar.StatusBarJellyHeaderView android:layout_width="wrap_content" android:layout_height="wrap_content" />
<TextView android:textSize="14.0sp" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:id="@id/clear_all_button" android:paddingLeft="15.0dip" android:paddingRight="15.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="4.0dip" android:layout_marginBottom="1.0dip" android:text="@string/status_bar_clear_all_button" style="StatusBar.ClearButton" />
Place
Code:
<include layout="@layout/qp_brightness" />
Or if you dont have a header or you dont want it within the header you can place it under the power widget
Under
Code:
<com.android.systemui.statusbar.powerwidget.PowerWidget android:id="@id/exp_power_stat" android:layout_width="fill_parent" android:layout_height="wrap_content" />
Place
Code:
<include layout="@layout/qp_brightness" />
Example 3 - CM9
Above
Code:
<FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
Place
Code:
<LinearLayout android:orientation="horizontal" android:background="@drawable/notification_header_bg" android:layout_width="fill_parent" android:layout_height="wrap_content">
<include layout="@layout/qp_brightness" />
</LinearLayout>
<View android:background="@drawable/status_bar_hr" android:layout_width="fill_parent" android:layout_height="2.0dip" />
7 - This step is optional and is for the icon next to the brightness slider
open res/layout/qp_brightness.xml
Look at
Code:
<ImageView android:paddingLeft="3.0px" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_brightness" />
This is the line for the image - change it how you like if you want to
note - to change the icon just replace ic_brightness.png that you placed in res/drawable-ldpi (or mdpi and so on) with one of your choice but make sure the filename remains ic_brightness.png
8 - Recompile and sign - if you are using cm7/9 sign the apk with a platform key using zip signer (playstore)
9 - Put in a flashable zip and flash in cwm with system mounted
credits
evanlocked
Will follow this one
EDIT:
thanks @marcussmith2626
workin perfectly
no force close or what
SystemUI FC'd on my phone..
Mind you, I am using a Sony Xperia Z running 4.3 and this thread is meant for GB and is in a Samsung forum so I could just be bringing it upon myself...lol
Ticklefish said:
SystemUI FC'd on my phone..
Mind you, I am using a Sony Xperia Z running 4.3 and this thread is meant for GB and is in a Samsung forum so I could just be bringing it upon myself...lol
Click to expand...
Click to collapse
I dont have a phone running 4.3 to test it on - iv tested on stock gb aosp gb cm7 and cm9
I do know it works on non samsung phones as someone else asked me about a bug in the brightness returning to a set level on restart but it turns out it was a bug to do with how his phone manages brightness
I dont know if the smali works on 4.3 but im sure if you had cm11 you have a brightness slider anyway if you enable in cyanogenmod settings and then swipe across the statusbar although it may not be a visable slider
it maybe just a case you need to arrange the layout for including qp_brightness in a different way to stop the force closing but Im not able to test this
you can try putting it where it is in the cm9 layout if your status_bar_expanded looks similar or just find somewhere else to place it
feel free to upload an unmodified systemui.apk and your framework-res and I will do it and you can see if it works but since iv not done it on a 4.3 phone Im not sure if it will work
marcussmith2626 said:
I dont have a phone running 4.3 to test it on - iv tested on stock gb aosp gb cm7 and cm9
I do know it works on non samsung phones as someone else asked me about a bug in the brightness returning to a set level on restart but it turns out it was a bug to do with how his phone manages brightness
I dont know if the smali works on 4.3 but im sure if you had cm11 you have a brightness slider anyway if you enable in cyanogenmod settings and then swipe across the statusbar although it may not be a visable slider
it maybe just a case you need to arrange the layout for including qp_brightness in a different way to stop the force closing but Im not able to test this
you can try putting it where it is in the cm9 layout if your status_bar_expanded looks similar or just find somewhere else to place it
feel free to upload an unmodified systemui.apk and your framework-res and I will do it and you can see if it works but since iv not done it on a 4.3 phone Im not sure if it will work
Click to expand...
Click to collapse
Oh, I've got a brightness bar already. I've pinched one from statusbargreper but it's not the best. I was hoping to use this one so that the brightness changes instantly (with the statusbargreper smali, the brightness changes when you take your finger off the screen).
I'm uploading my framework-res.apk, stock SystemUI.apk and also the SystemUI.apk I made with this mod. Just in case..
https://www.mediafire.com/?hq98l4epd1qhs23
Ticklefish said:
Oh, I've got a brightness bar already. I've pinched one from statusbargreper but it's not the best. I was hoping to use this one so that the brightness changes instantly (with the statusbargreper smali, the brightness changes when you take your finger off the screen).
I'm uploading my framework-res.apk, stock SystemUI.apk and also the SystemUI.apk I made with this mod. Just in case..
https://www.mediafire.com/?hq98l4epd1qhs23
Click to expand...
Click to collapse
iv done some test SystemUI.apk for you
in each one all iv done is move the layout of qp_brightness around so hopefully one of the layouts wont cause a force close
let me know if any work and I can add it to the guide
just rename the apks SystemUI.apk and flash them with a flashable zip - im sure you know already
http://d-h.st/Rdw
marcussmith2626 said:
iv done some test SystemUI.apk for you
in each one all iv done is move the layout of qp_brightness around so hopefully one of the layouts wont cause a force close
let me know if any work and I can add it to the guide
just rename the apks SystemUI.apk and flash them with a flashable zip - im sure you know already
http://d-h.st/Rdw
Click to expand...
Click to collapse
Thanks, I'll have to check them out tomorrow.
Sent from my C6603 using Tapatalk
Easy to follow.Thanx
Sent from my GT-S5360 using Tapatalk 2
How to fix this layout problem ?
Sent from my GT-S5360 using xda app-developers app
GSculerlor said:
How to fix this layout problem ?
Sent from my GT-S5360 using xda app-developers app
Click to expand...
Click to collapse
See san122 guide
GSculerlor said:
How to fix this layout problem ?
Sent from my GT-S5360 using xda app-developers app
Click to expand...
Click to collapse
the png on left is already explained in step 7
the colour of the slider itself is to do with your framework-res in progress_horizontal.xml
the slider icon on the bar is also to do with your framework but I dont know what png it is - I think its a .9.png somewhere - you will have to look through as the names may vary with rom
Mranggapo said:
See san122 guide
Click to expand...
Click to collapse
Thanks for an excellent guide!
marcussmith2626 said:
iv done some test SystemUI.apk for you
in each one all iv done is move the layout of qp_brightness around so hopefully one of the layouts wont cause a force close
let me know if any work and I can add it to the guide
just rename the apks SystemUI.apk and flash them with a flashable zip - im sure you know already
http://d-h.st/Rdw
Click to expand...
Click to collapse
FC's on all four, I'm afraid. I don't think this is a layout issue, it's probably a smali/4.3 thing. Which is a bugger.
Ticklefish said:
FC's on all four, I'm afraid. I don't think this is a layout issue, it's probably a smali/4.3 thing. Which is a bugger.
Click to expand...
Click to collapse
yeah it may well be - if I ever get a 4.3/4.4 device in the future I can look at it properly
Not that it's got anything with your topic to do, but I thought I'd might ask anyway.
I followed this guide to create another clear button:
http://forum.xda-developers.com/showthread.php?t=1953934
Which works good, but I would like the clear button to be aligned to the right on the row.
Is there any possibilities to that?
richard.elgh said:
Not that it's got anything with your topic to do, but I thought I'd might ask anyway.
I followed this guide to create another clear button:
http://forum.xda-developers.com/showthread.php?t=1953934
Which works good, but I would like the clear button to be aligned to the right on the row.
Is there any possibilities to that?
Click to expand...
Click to collapse
Iv used that mod in my status bar - you can try changing the gravity of the linear layout
here is link to my status bar if you want to compare
http://forum.xda-developers.com/showthread.php?p=49468255
marcussmith2626 said:
Iv used that mod in my status bar - you can try changing the gravity of the linear layout
here is link to my status bar if you want to compare
http://forum.xda-developers.com/showthread.php?p=49468255
Click to expand...
Click to collapse
It wasn't as easy as this though: android:gravity="right"
richard.elgh said:
It wasn't as easy as this though: android:gravity="right"
Click to expand...
Click to collapse
that will only work if its in its own layout else everything in that layout will go to the right
you could also try to increase its padding on one side which might shift it over
Code:
android:paddingLeft="8.0dip"
and I think theres also a next to command which will put it next to a certain @ID
for example
Code:
android:layout_toRightOf="@id/date"
which will put it to the right hand side of the date
you will just have to play around with the layout to get it how you want
marcussmith2626 said:
that will only work if its in its own layout else everything in that layout will go to the right
you could also try to increase its padding on one side which might shift it over
Code:
android:paddingLeft="8.0dip"
and I think theres also a next to command which will put it next to a certain @ID
for example
Code:
android:layout_toRightOf="@id/date"
which will put it to the right hand side of the date
you will just have to play around with the layout to get it how you want
Click to expand...
Click to collapse
This is my command:
<TextView android:textColor="@android:color/transparent" android:layout_gravity="center_vertical"" android:id="@id/clear_all_button" androidaddingLeft="15.0dip" androidaddingRight="15.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="4.0dip" android:layout_marginBottom="1.0dip" android:text="@string/status_bar_clear_all_button" style="@style/Awesome.Button" />
Just decreasing the paddingRight didn't make a change, but I can try changing the paddingLeft tomorrow.
Thanks.
richard.elgh said:
This is my command:
<TextView android:textColor="@android:color/transparent" android:layout_gravity="center_vertical"" android:id="@id/clear_all_button" androidaddingLeft="15.0dip" androidaddingRight="15.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="4.0dip" android:layout_marginBottom="1.0dip" android:text="@string/status_bar_clear_all_button" style="@style/Awesome.Button" />
Just decreasing the paddingRight didn't make a change, but I can try changing the paddingLeft tomorrow.
Thanks.
Click to expand...
Click to collapse
this is my layout for comparison - you can see what it looks like in the screenshot of the status bar thread I gave in last post or in my signature
Code:
<LinearLayout android:orientation="vertical" android:id="@id/power_and_carrier" android:background="@drawable/title_bar_portrait" android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content">
<com.android.systemui.statusbar.powerwidget.PowerWidget android:id="@id/exp_power_stat" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/carrier_label_layout" android:layout_width="fill_parent" android:layout_height="wrap_content">
<com.android.systemui.statusbar.StatusBarJellyHeaderView android:layout_width="wrap_content" android:layout_height="wrap_content" />
<TextView android:textSize="14.0sp" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:id="@id/clear_all_button" android:paddingLeft="15.0dip" android:paddingRight="15.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="4.0dip" android:layout_marginBottom="1.0dip" android:text="@string/status_bar_clear_all_button" style="StatusBar.ClearButton" />
<include layout="@layout/qp_brightness" />
</LinearLayout>
</LinearLayout>