[MIUI_V5 Bugfix][TUT] Fix RTL Bug on MIUI V5 Applications - Galaxy S III Android Development

Hi to All
I found the RTL bug on default MIUI V5 applications, after working on default's miui programs like Messaging, Contacts, Notes, .... finally i found the bug where it comes from.
little explanation how to fix this issue on Messaging app.
the problem is come from where the miui developers did not defined the android layout gravity for text editing layouts, when you don't add layout gravity for item, it will stick to left for all items. now when you want type over right layout based languages, like Persian, Arabic, Hebrew, Urdu ..., it will stick to left and you cant edit the text, the courser will stick to left while you are typing from right. i hope understand what i mean.
now get back to title and there is a solution.
we need to edit all MIUI V5 apps and put the layout_gravity parameter on edit text layouts, but its required huge work and need too much free time.
but there is simple way to fix this issue:
i study an d checking the MIUI V5 apps , and find that all of those text layouts have common style and they referred to "V5.TextAppearance" style.​i found this style on "framework-miui-res.apk" file. finally i changed this style and all RTL problems are fixed already.
lets begin the tutorial:
1- De-compile the framework-miui-res.apk file.
2- open /res/values/styles.xml file via Notepad++
3- how to fix text edit layouts rtl problem , like Music player meta ID3 editor, Messaging app and phone.
do a search and find this style:
PHP:
<style name="V5.TextAppearance" parent="@*android:style/TextAppearance">
<item name="android:textSize">@dimen/v5_text_font_size_primary</item>
</style>
4- fix the styles:
add this below line through above style:
PHP:
<item name="android:gravity">start</item>
finally we have :
PHP:
<style name="V5.TextAppearance" parent="@*android:style/TextAppearance">
<item name="android:gravity">start</item>
<item name="android:textSize">@dimen/v5_text_font_size_primary</item>
</style
​4- how to fix texts on search layout's rtl problem like Contacts search function, Notes search function, Music player search function
find this line:
PHP:
<style name="V5.Widget.EditText" parent="@*android:style/Widget.EditText">
on this style you will see this parameter:
PHP:
<item name="android:gravity">left|center</item>
change the above parameter to below one:
PHP:
<item name="android:gravity">start|center</item>
finally we have:
PHP:
<style name="V5.Widget.EditText" parent="@*android:style/Widget.EditText">
<item name="android:textAppearance">@style/V5.TextAppearance.EditText</item>
<item name="android:gravity">start|center</item>
<item name="android:background">?v5_edit_text_bg</item>
<item name="android:singleLine">true</item>
</style>
5- save the "Styles.xml" file and close Notepad++ application.
6- compile "framework-miui-res.apk" file.
7- now transfer your edited "framework-miui-res.apk" into your phone.
8- enjoy!​
Original Thread, Persian Language
Best Regards , Amestris Team

How to fix RTL issue on Global search in home screen.
1- decompile QuickSearchBox.apk
2- open /res/layout/query_text_view.xml via notepad++
3- find this item:
Code:
android:gravity="left|center"
4- change above item to
Code:
android:gravity="start|center"
5- compile and move it into system/app folder.
​

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

thread is updated. if you find any rtl bugs either please report me.
best regards.

M_J_Nazari said:
thread is updated. if you find any rtl bugs either please report me.
best regards.
Click to expand...
Click to collapse
Thanks!! What about SMS pop-up (the quick respond)?

SagiMedina said:
Thanks!! What about SMS pop-up (the quick respond)?
Click to expand...
Click to collapse
yes, its fixed too.

Related

[Themers]MetaMorph Reform and How to properly make a MetaMorph for everyone's use

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
What MetaMorph is
MetaMorph is a project designed to allow us to patch files within .jar and .apk files on the phone.
Initially MetaMorph was designed for themers but it was discovered through use that we could also use it for applying customer dex files, resource files, images, and xml files. Pretty much anything inside of the apk and jar can be replaced with MetaMorph, which makes it very versatile and useful, in addition to this we can now copy files to places on the phone or sdcard, and we can implement the use of scripts now!
Purpose for a Reform:
Usually MetaMorphs are made for a specific phone and rom. Instead of classifying them by a Phone model, we should be classifying them by the phone's Resolution (ldpi,mdpi,hdpi). Also, the rom name should be the name of the rom compatible with the theme (Cupcake,Donut,Eclair,Froyo).
Benefits:
-Instead of have multiple MetaMorph versions for different types of phones, we will have only 3 different Resolution sizes coving multiple phones and roms.
-By using the name of the specific rom, we know that the theme fits perfectly with no problems. Also any files not present will be skipped by MetaMorph, further perfecting any chance of errors.
-MetaMorph can now be available for multiple phones. They can now also enjoy the beautiful themes created by our talented themers.
Quick rules and standard procedures for your MetaMorph theme
1)Your MetaMorph theme.xml should be as specific as possible.
Sample:
Code:
<?xml version="1.0"?>
<!-- MetaMorph theme template XML -->
<!-- Enter the name of this theme -->
<themename>Vanilla Upgrade</themename>
<!-- Enter the version of this theme -->
<themeversion>1.0</themeversion>
<!-- Enter the name of the png with out the (.png) extention -->
<screenshot></screenshot>
<!-- Enter the person(s) involved in this theme -->
<author>RichieDaze</author>
<!-- Enter the web location of this theme -->
<authorweblink></authorweblink>
<!-- Enter the resolution compatible for this theme (ldpi,mdpi,hdpi) -->
<phone>MDPI</phone>
<!-- Enter the name of the Android OS name this theme is compatible with -->
<rom>FROYO</rom>
<!-- Enter a description of this theme -->
<themedescription></themedescription>
2)Your screen shot can be named anything, but Screenshot should be default.
3)The <phone> entry should display the phones resolution(ldpi,mdpi,hdpi).
4)The <rom> entry should display the name of the compatible rom for your theme(cupcake,donut,eclair,froyo).
5)You should not have any png's or folders you did not edit in your theme folder.
6)Add all your png and xml edits in there proper folder(s).
7)Remember which folders make your phone reboot and place them last on the theme.xml's list.
8)When posting your MetaMorph, you should enter something like: [MetaMorph-mdpi] Name of your theme for 2.2, so that other users know if they can apply it to there phones. Plus searching from a search engine can have better results when looking for a compatible theme for your phone.
Following these rules will make MetaMorph much more enjoyable for everyone...
MetaMorph Commands
These following commands will be clarified one by one
The cpy command Copies from a specified folder in this theme's folder to the path folder.
Code:
<item>etc.cpy</item>
<path>/system/etc/</path>
<description></description>
-The above code tells MetaMorth to copy the contents of etc from your theme to the path: /system/etc
The script command Runs scripts as SU from a specified folder in this theme's folder
Code:
<item>Scripts.script</item>
<path>reboot.sh</path>
<description></description>
-The above code tells MetaMorph to Run a script as SU from the Scripts folder in the theme's folder.
The Regular command replaces any file into a apk/jar.
Code:
<item>framework-res.apk</item>
<path>/system/framework</path>
description></description>
or
Code:
<item>services.jar</item>
<path>/system/framework</path>
description></description>
-The above code tells MetaMorth to copy the contents of the framework/services folder from your theme to the path: /system/framework
Basic file structure for a sub-theme
Lets say your doing a sub-theme for framework-res.apk.
Your folder woulld be called framework-res (without the extension)
The same goes for the folders inside framework-res, in it's proper order.
drawable-mdpi would be in a folder called res.
So here is the break down: framework-res/res/drawable-mdpi/
-Reserved for different phone/rom thread links...
-MetaMorph Theme template XML
-Locations of xml's or jar to change the text colors
So how is the MetaMorph coming for Community Hero Mix?
Any progress?
Binary100100 said:
So how is the MetaMorph coming for Community Hero Mix?
Any progress?
Click to expand...
Click to collapse
This progress is about 90% done. I have only the task of the Launcher. Since different roms use different launchers the task becomes a bit harder.

Theming question

Could someone please tell me where the background color can be modified for the menu button (wallpaper, settings, search, etc)? I have been looking everywhere for this, but I am not finding it.
Thanks in advance for the help.
jlsesler said:
Could someone please tell me where the background color can be modified for the menu button (wallpaper, settings, search, etc)? I have been looking everywhere for this, but I am not finding it.
Thanks in advance for the help.
Click to expand...
Click to collapse
Its a few .png files in framework-res.apk/res/drawable-hdpi. They're called menu something. Can't remember the exact file name off the top of my head, but they're there.
Sent from my MB860 using XDA Premium App
There are a few things to look for to get the look that you want.
in /res/values/styles.xml depending on what you have for this set of xml determines which .png's the framework is using:
Code:
<style name="Theme.IconMenu" parent="@style/Theme">
<item name="windowAnimationStyle">@style/Animation.OptionsPanel</item>
<item name="background">@null</item>
<item name="itemTextAppearance">@style/TextAppearance.Widget.IconMenu.Item</item>
<item name="horizontalDivider">@drawable/divider_horizontal_bright</item>
<item name="verticalDivider">@drawable/divider_vertical_bright</item>
<item name="itemBackground">@drawable/menu_selector</item>
<item name="itemIconDisabledAlpha">?disabledAlpha</item>
<item name="moreIcon">@drawable/ic_menu_more</item>
</style>
but if you are using an existing theme that is darker then the chances are it will be something like this:
Code:
<style name="Theme.IconMenu" parent="@style/Theme">
<item name="windowAnimationStyle">@style/Animation.OptionsPanel</item>
<item name="background">@null</item>
<item name="itemTextAppearance">@style/TextAppearance.Widget.IconMenu.Item</item>
<item name="horizontalDivider">@drawable/divider_horizontal_dark</item>
<item name="verticalDivider">@drawable/divider_vertical_dark</item>
<item name="itemBackground">@drawable/menu_selector</item>
<item name="itemIconDisabledAlpha">?disabledAlpha</item>
<item name="moreIcon">@drawable/ic_menu_more</item>
</style>
Now with that said, if it is using the first case, you will be looking for files named "divider_horizontal_bright.9.png" and "divider_vertical_bright.9.png". They are .9.png's so deal with them accordingly. Now if you have the second case then you are going to look for "divider_horizontal_dark.9.png" and "divider_vertical_dark.9.png".
Edit those to get your desired effect, but those are only the dividers of the menu.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Now I'm going to go back over the xml to show you what I'm looking at.
Code:
<item name="horizontalDivider">[COLOR="Blue"]@drawable/divider_horizontal_bright[/COLOR]</item>
<item name="verticalDivider">[COLOR="Blue"]@drawable/divider_vertical_bright[/COLOR]</item>
Code:
<item name="horizontalDivider">[COLOR="Red"]@drawable/divider_horizontal_dark[/COLOR]</item>
<item name="verticalDivider">[COLOR="Red"]@drawable/divider_vertical_dark[/COLOR]</item>
Those two items determine which .png the framework is looking at, and using that will tell you what to look for when you are editing your theme.
Now lets look at a much more rather obscure portion of the xml, but it still tells you where to look. Under "<style name="Theme">" near the beginning of the styles.xml, there is a long list of items pointing to different .png's in the framework. The one we are interested in is:
Code:
<item name="panelBackground">[COLOR="Purple"]@drawable/menu_background[/COLOR]</item>
<item name="panelFullBackground">[COLOR="Purple"]@drawable/menu_background_fill_parent_width[/COLOR]</item>
This tells you what to look for to edit the background of the menu, and the "top" horizontal bar if you want one.
So look for "menu_background.9.png" and "menu_background_fill_parent_width.9.png". Edit them to have the same look, because the "menu_background_fill_parent_width.9.png" is what you get when you press the menu button, and the "menu_background.9.png" is what you get when you press the "more" button. Again, these are .9.png's so edit them accordingly. If you have any more questions, please ask! I tried to make this as clear as I possibly could.
This is awesome info. Thanks!
I don't see the values directory in the framework-res.apk file. Am I missing something?
jlsesler said:
I don't see the values directory in the framework-res.apk file. Am I missing something?
Click to expand...
Click to collapse
u need to decompile it
I decompiled it with 7zip. I see the res directory, but not the values directory. I see a lot of other directories, but none of them have a styles.xml.
You must decompile it with apk manager. Google it.
Sent from my GT-I9000 using XDA App
jlsesler said:
I decompiled it with 7zip. I see the res directory, but not the values directory. I see a lot of other directories, but none of them have a styles.xml.
Click to expand...
Click to collapse
7zip is only used for extraction not decompiling an apk. Here is a link to apk manager: http://forum.xda-developers.com/showthread.php?t=695701
Also, you don't really NEED to decompile the framework to do it, I just wanted you to maybe learn something instead of just following instructions like must people do. I still encourage you to decompile it and have a look around. Its rather interesting
Edit: thanks watsa, I'm on my phone and couldn't really give him a link.
Sent from my GT-I9000 using XDA App
looks like im about to hit the point of no return into the world of theme editing/developing. Thanks again for the help all!
OK. Here is where I am at:
- downloaded apk manager
- decompiled framework-res.apk
- modified the following lines from styles.xml:
FROM:
<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">?textColorPrimaryInverse</item>
</style>
TO:
<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">?textColorPrimary</item>
</style>
I did this do reverse the text color of the menu since I have a dark background.
- compiled apk
- signed apk
I copied this new framwork-res.apk into my system/framework folder and rebooted. When it came back up, it was force closing all over the place.
Any idea where I went wrong?
For one don't sign the apk, it's a system app, it is not signed. And go from a clean framework, do the edit, and recompile (without signing) and see if that works.
That worked. It was a rookie mistake i suppose (I am making many of them). Thanks again for the help.
How do you create a CWM update zip (edify)? I am having trouble with the update-binary file.
jlsesler said:
How do you create a CWM update zip (edify)? I am having trouble with the update-binary file.
Click to expand...
Click to collapse
use this to drop your apk' in respective folder.
You may want to put this line
Code:
run_program("/sbin/mount", "/dev/block/stl9", "/system");
in before
Code:
package_extract_dir("system", "/system");
in the updater-script because on Gingerbread roms I was having problems with /system being mounted before the flash. If you don't need it, then cool, but I put it in mine just in case because I know I needed it for Cognition. Of course it may already be there, I didn't download the Theme.zip to see what was inside it...

Help theming FlymeOS StatusBar

Hello,
I have a meizu MX HK M30 dual core with flymeOS 1.1.7 Which is based/created upon Android ICS 4.0.3.
I want to theme my status bar, but the SystemUI.apk is completetly different than other ICS Rom or CM9 Rom.
I have tried different thing for modding but all the time systemUI stop working, but compiling with no errors, I think there is some isssue with smali code.
So I need the help of a good themer for modding and explain to me how my systemUI for statusbar work.
I want a small transparent statusbar with center clock whithout date, wifi and carrier signal on the left.
I upload some screen shot of FlymeOS
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
As you can see in the Home there is a big statusbar and this is here that I want a small statusbar.
Make attention the notification of sms or other are in the second row of the big statusbar and need to be placed at the top.
Here is a Google Drive link with stock deodexed SystemUI.apk Framework-res.apk of FlymeOS 1.1.7 :
https://docs.google.com/folder/d/0B5e4iFwEmsizUjdhYlZ5UE1XN1E/edit
Thanks in advance.
The trick used by MrColdbird to always have the small statusbar is to pretend we're never on the Home Screen (if I understood correctly the smali mods).
Regarding the placement, I think the xml res mention several date objects
- com.android.systemui.statusbar.policy.HomeClock
com.android.systemui.statusbar.policy.DateView in layout/status_bar_large.xml & layout/home_lower_panel.xml
(2-row status)
- com.android.systemui.statusbar.policy.Clock in layout/status_bar_opr.xml
(?)
- com.android.systemui.statusbar.policy.Clock in layout/status_bar_small.xml
(1-row status?)
- com.android.systemui.statusbar.policy.DateView in layout/status_bar_expanded.xml
(dragged statusbar?)
Can you try & see if you can tweak these xml files?
Edit: does it belong better in forumdisplay.php?f=1905 ?
Thanks for reply
Do you come from MeizuMe?
So I have already tried to change some value in this XML files
If I undestand correctly the large home status bar work like that :
there is one file in res/layout/statusbar.xml this file call three other XML for the different look of the status bar :
- 1 res/layout/small_status_bar.xml which is the code for the look of the status bar when an app is open.
- 2 res/layout/opr_status_bar.xml which is the code for the lockscreen status bar.
- 3 res/layout/status_bar_large which is the code for the home status bar this file include a call of /res/layout/home_lower_panel.xml which is the second line of large home status bar.
So the thing that I want to know is can I remove the Home_lower_panel.xml whithout problem or I need to touch the smali code ?
If I need to touch the smali code I can't because I don't understand how smali works. I have already read some article on the google dev guide but I don't undestand.
Can you try some edit on the systemUI file try to compil and upload your file for testing I need an external coder and point of view because my processus for modding is wrong.
I put the recommended files for work on google drive : systemUI you have the framework-res.apk and systemUI.apk
try in your side give me the file for testing.
( ATTENTION : If you have your own meizuMX for testing be carrefull the files that I have upload come from FlymeOS 1.1.7 the latest update from meizu.
I have Just deodex the rom. So if you want to test in your own you need a Flyme 1.1.7 deodex rom, I can upload it if you need.)
Sometimes I have some aapt error when (for example) : I remove home_lower_panel.xml and I tried to recompile.
For a succefull compil I need to export the classes.dex and ressource.arcs inside my working SystemUI folder.
But after that I have SystemUI stop working when the phone start I use root explorer, I give the good permissions.
Do you think I make something wrong and do I need to make a flash zip and clear data ?
And I don't understand what you mean "Edit: does it belong better in forumdisplay.php?f=1905 ?" ?
Thanks for giving a little of your time for some FlymeOS user.
Hi,
No body with experiences in ICS, JB, CM theming wants to help ? please, take a look on the file which I upload.
Thanks.

[GUIDE] Translate/Add Language To Custom Roms..

Translate/Add Language To Custom Roms
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
TOOLS NEEDED​
ApkTool
Notepad++
SO LET'S START
• PREPARE APKS
1. In this example, we will modify Settings.apk and translate it to Spanish language.
2. Take Settings.apk from stock ROM that supports Spanish and rename it to Settings-ES.
If your language is not Spanish, then of course you need to take Settings.apk
from stock rom for you region which support your language.
3. Take Settings.apk from the rom which you want to translate.
You don't need to rename it. Leave it as it is.
• DECOMPILE APKS
1. Decompile both the apks using apktool.
• TRANSLATE/ADD ADDITIONAL LANGUAGE TO APK
1. After decompiling apk, look for the "values"
folder inside the decompiled APK
2. You should do the same for Settings-ES and open it in
another folder so you can view both folders side-by-side
3. You can simply take "values-es" folder from
Settings.apk and copy it to Settings\res
4. After copying folder, open Settings\res\strings and add the values
present in Settings.apk's res\values\strings.xml to "values-es" folder.
5. After that, compile your APK and now
you have a translated version of APK.
6. Do this for every app
you want to be translated.
NOTE:
Only strings.xml and arrays.xml values needs translation.
You only need to translate values inside
Code:
<string name="[COLOR="Red"][B]alert_mesage_recipients[/B][/COLOR]">[COLOR="Green"][B]Alert message recipients[/B][/COLOR]</string>
<string name="[COLOR="red"][B]text_you_should_not_translate[/B][/COLOR]">[COLOR="green"][B]Text you should translate[/B][/COLOR]</string>
Example:
<string name="alert_mesage_recipients">Alert message recipients</string>
You will translate "Alert message recipients"
You should NOT translate "alert_mesage_recipients"
Translated example:
<string name="alert_mesage_recipients">Alerta destinatarios del mensaje</string>
CREDITS:
CarlDeanCatabay
Please point out the faults in the guide if there is any..
Help to add language
Hi I need help. I have buy Xiaocai X800 and the is no Polish language. I searched in web and all custom roms (I fleshed) do not suport Polish. I need to have Polish everywhere (system, aps etc) because the phone is for my kid . If that help I have original rom from Sp Flesh Tool
alahander said:
Hi I need help. I have buy Xiaocai X800 and the is no Polish language. I searched in web and all custom roms (I fleshed) do not suport Polish. I need to have Polish everywhere (system, aps etc) because the phone is for my kid . If that help I have original rom from Sp Flesh Tool
Click to expand...
Click to collapse
Are you have Stock rom?
You can Extract it and get System/app folder
YSH ALSAGER said:
Are you have Stock rom?
You can Extract it and get System/app folder
Click to expand...
Click to collapse
Yes I have original ROM but I don't know that to change in it to insert polish language
Try this guide
alahander said:
Yes I have original ROM but I don't know that to change in it to insert polish language
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=2294909
how to translate all completely rom
as adding new languages in a stock natively
or is necessary translated apk by apk as in the example that is in this guide
thanks and good job..!!
hey i want to tranlate settings.apk to polish but i don't know how can I add new launguage. I created new folder i values and named values-pl but when i put my new Settings.apk I can't se Polish in my laungugage settings can you help me? hey i want to tranlate settings.apk to polish but i don't know how can I add new launguage. I created new folder i values and named values-pl but when i put my new Settings.apk I can't see Polish in my laungugage settings list can you help me?
is there any batch tool for this?
i want to add language to rom that not support this language
i found an article that says: in system folder of the rom decompile "framework-res.apk" and after that translate some xml files pack it back to zip and flash it
the problem is i didn't find the stock rom so i downloaded twrp backup file and extract it to similar format like a rom i do it all.
my question is if i will pack it back(after modified) and try to flash it it will work?

[REQUEST] Dual clock on status bar

Hi there.
I was wondering if it is possible to create a module that adds a second clock to the status bar. I live abroad, and I used to use xposed for that (there's a module called XDualStatusClock which worked great) so I could have my home country and tmy residence country's time on the status bar. I have since upgraded to Lineage OS 14.1 (Nougat) and unfortunately xposed is not supported.
I haven't found any app that does this and I wanted to know if it would be possible to have something like that in Magisk. If anybody knows or knows if there is another way to do it, please, let me know.
Thabk you in advance.
Xposed and Magisk do quite different things (code injection vs file injection).
The short answer to your question is: Yes, it's possible but not as easy as you'd like.
The long answer is: If you wan't this with Magisk, you'll need use a Magisk module to mount and replace system files with modded files to get what you're after. Xposed can do this on the fly, Magisk does it by replacing system files with previously prepared files at boot.
pancomido said:
Hi there.
I was wondering if it is possible to create a module that adds a second clock to the status bar. I live abroad, and I used to use xposed for that (there's a module called XDualStatusClock which worked great) so I could have my home country and tmy residence country's time on the status bar. I have since upgraded to Lineage OS 14.1 (Nougat) and unfortunately xposed is not supported.
I haven't found any app that does this and I wanted to know if it would be possible to have something like that in Magisk. If anybody knows or knows if there is another way to do it, please, let me know.
Thabk you in advance.
Click to expand...
Click to collapse
All you need to do is decompile your system.apk and add a textclock to your status_bar.xml and set the time zone. I'm on Central time but I added a los Angeles time zone on an additional text clock. Flashed it systemlessly using djb77's evilthemer magisk module maker flashing just the status_bar.xml
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Tulsadiver said:
All you need to do is decompile your system.apk and add a textclock to your status_bar.xml and set the time zone. I'm on Central time but I added a los Angeles time zone on an additional text clock. Flashed it systemlessly using djb77's evilthemer magisk module maker flashing just the status_bar.xml
Click to expand...
Click to collapse
Can you please specify, what the line was that you added in statusbar?
winesh said:
Can you please specify, what the line was that you added in statusbar?
Click to expand...
Click to collapse
To put it in the center of statusbar put this code right under xmlns:systemui="http://schemas.android.com/APK/res/com.android.systemui">
<TextClock android:textAppearance.StatusBar.Clock" android:gravity="center" android:I'd="@id/clock" android:layout_width="fill_parent" android:layout_height="fill_parent" android:single line="true" android:format12Hour="EEE h:mm a" android:timeZone="America/Los_Angeles" />
You can format it how you like and of course substitute the time zone you want. Also insert 24Hour format to the same code if you like.
Tulsadiver said:
To put it in the center of statusbar put this code right under xmlns:systemui="http://schemas.android.com/APK/res/com.android.systemui">
<TextClock android:textAppearance.StatusBar.Clock" android:gravity="center" android:I'd="@id/clock" android:layout_width="fill_parent" android:layout_height="fill_parent" android:single line="true" android:format12Hour="EEE h:mm a" android:timeZone="America/Los_Angeles" />
You can format it how you like and of course substitute the time zone you want. Also insert 24Hour format to the same code if you like.
Click to expand...
Click to collapse
Thanks bro, will try it as soon as possible.

Categories

Resources