[MOD] Center clock and the battery charge in percent for stock 5.0.1 - Nexus 5 Themes and Apps

hi everyone... here is another mod from me
install from recovery
for odex/deodex stock rom 5.0.1
fix on lock screen if charge phone and reupload mod

if you have odex system, then after installation of this mod,wipe cache

Hi, thanks for this mod! Can you please show us how you did that by making a tutorial. Also is it possible to add the percentage number next to the battery icon? (see attached screenshot).

iliass01 said:
Hi, thanks for this mod! Can you please show us how you did that by making a tutorial. Also is it possible to add the percentage number next to the battery icon? (see attached screenshot).
Click to expand...
Click to collapse
add smali
decompile my mod and use diff
in C:\ApkTools200RC3m\SystemUI\res\layout\system_icons.xml (this im hide stock batt icon)
android:visibility="gone" android:layout_width="0.0dip" android:layout_height="0.0dip"
in C:\ApkTools200RC3m\SystemUI\res\layout\status_bar.xml (this clock in center)
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/notification_icon_area_inner" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="start|center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
in C:\ApkTools200RC3m\SystemUI\res\layout\signal_cluster_view.xml (this text batt in %)
Code:
<com.erryy.BatteryText android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
in values\dimens.xml
<dimen name="keyguard_carrier_text_margin">156.0dip</dimen> (its for center operator logo on lockscreen)

Is it possible for you to increase the size of the number and the percentage to fit to the icons next to it? And a "revert to stock" flashable zip would be great! :fingers-crossed::good:

Could someone post a flashable zip with the battery percentage next to the stock battery icon please?

Is it possible to get am/pm?
---------- Post added at 06:11 PM ---------- Previous post was at 06:00 PM ----------
Thanks for the wonderful mods btw

First of all, thanks for your mod! Good work
For me I've made a little change in the "SystemUI\res\layout\signal_cluster_view.xml "
Code:
<com.erryy.BatteryText [B][color=red]android:textSize="@dimen/battery_level_text_size"[/B][/color] android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
so the percent matches better to the rest in size.

Dirk64 said:
First of all, thanks for your mod! Good work
For me I've made a little change in the "SystemUI\res\layout\signal_cluster_view.xml "
Code:
<com.erryy.BatteryText [B][color=red]android:textSize="@dimen/battery_level_text_size"[/B][/color] android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
so the percent matches better to the rest in size.
Click to expand...
Click to collapse
Dirk, can you show us a screenshot and post your flashable zip? Would be great! Thank you very much in advance ::good:

This is a screenshot of the mod but I've made other changes to the framework-res.apk and the SystemUI to change dpi of the NavBar.
I can upload but it's at home on my computer so it will be tomorrow if you want and if it's okay for this is not my thread and I don't want to open a new one.

Dirk64 said:
This is a screenshot of the mod but I've made other changes to the framework-res.apk and the SystemUI to change dpi of the NavBar.
I can upload but it's at home on my computer so it will be tomorrow if you want and if it's okay for this is not my thread and I don't want to open a new one.
Click to expand...
Click to collapse
That looks real nice, great job. Can you please also make a zip to flash back to stock. thanks, man :good:

I think, it's garynynch's thread and I'm pretty sure, he can do this also. It's only a small change in one xml and I don't want to post things based on his work as mine here.

hi Can you please do a flashable zip for Center clock, battery icon and %

Try this and let me know how it turns out. Unsure about the lock screen.
Change SystemUI\res\layout\system_icons.xml on line 6 from
PHP:
<com.android.systemui.BatteryMeterView android:id="@id/battery" android:visibility="gone" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_marginBottom="@dimen/battery_margin_bottom" android:layout_marginStart="7.0dip" />
to
PHP:
<com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="9.5dip" android:layout_height="14.5dip" android:layout_marginBottom="@dimen/battery_margin_bottom" android:layout_marginStart="7.0dip" />
Change SystemUI\res\layout\signal_cluster_view.xm on line 15 from
PHP:
<com.erryy.BatteryText android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
to
PHP:
<com.erryy.BatteryText android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textSize="@dimen/battery_level_text_size" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />

Here is another one without the center clock & carrier name

I flashed your mod and it does work. How can I have battery percent to right the battery icon? Thank you.

@ garynynch, I've got the second percent charging notification in the lockscreen disabled by changing this line in the keyguard_status_bar.xml:
Code:
<TextView android:textSize="@dimen/battery_level_text_size" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:id="@id/battery_level" [B][color=red]android:visibility="gone" android:layout_width="0.0dip" android:layout_height="0.0dip"[/color][/B] android:importantForAccessibility="noHideDescendants" android:paddingEnd="@dimen/battery_level_padding_end" android:layout_marginStart="@dimen/header_battery_margin_keyguard" />
hope, it helps

What line would I need to edit in order to add am/pm to the time? The numbers just look to plain on their own (I use 12hr time)
Also, how difficult is it to add a circle-percent battery mod? We can take the images from CM's circle battery mod with percent. I'm guessing the framework and/or systemUI will need much tweaking (or is it completely different on Lollipop?)

tonysansone said:
I flashed your mod and it does work. How can I have battery percent to right the battery icon? Thank you.
Click to expand...
Click to collapse
These are the tools I used
tool to compare xml & smali files
to view and edit xml & smali files
to decompile and recompile apks
to sign zip files
Good luck

Thanks mate. But I needed to know the code and the xml file that I must modify to move to right of the battery icon the percent text.
Sent from my Nexus 4 using XDA Free mobile app

Related

[MOD] add RadioInfo to Wireless Settings

**Now in rom manager
**Only for deodexed roms.
**Manual patch recommended for themed/nonstock roms
This mod adds the Radio Info (aka Phone Information) to the Wireless & networks menu in Settings. Allowing you to do such things as changed your preferrednetwork settings (ie turn LTE on / off) without additional applications.
This is based on stock Settings.apk, and should work with most if not all deodexed roms. Only tested with stock (deodexed), Basic Debloat and Das BAMF. Do a nandroid backup before flashing.
To turn LTE off:
Go to settings -> Wireless & networks -> Radio Info
Scroll down to the "Set preferred network Type:" dropdown box/spinnger
Choose: CDMA auto (PRL)
To turn LTE on:
Go to settings -> Wireless & networks -> Radio Info
Scroll down to the "Set preferred network Type:" dropdown box/spinnger
Choose: CDMA + LTE/EvDo auto
http://www.multiupload.com/77GYQGTRKI
Rom Chefs:
Feel free to include this with your rom, as long as full credit to TeamAndIRC is made for it.
Patch Details:
Only change was an addition of an HtcPrefrenceScreen to res/xml/wireless_settings.xml. Change shown in red.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<com.htc.preference.HtcPreferenceScreen android:title="@string/radio_controls_title"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.htc.preference.HtcCheckBoxPreference android:persistent="false" android:title="@string/airplane_mode" android:key="toggle_airplane" android:summary="@string/airplane_mode_summary" android:disableDependentsState="true" />
<com.htc.preference.HtcCheckBoxPreference android:persistent="false" android:title="@string/wifi_quick_toggle_title" android:key="toggle_wifi" android:summary="@string/wifi_quick_toggle_summary" />
[COLOR="Red"] <com.htc.preference.HtcPreferenceScreen android:title="Radio Info" android:summary="Advanced Radio Tools">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.RadioInfo" />
</com.htc.preference.HtcPreferenceScreen>[/COLOR]
<com.htc.preference.HtcPreferenceScreen android:title="@string/wifi_settings" android:key="wifi_settings" android:summary="@string/wifi_settings_summary">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.wifi.WifiSettings" />
</com.htc.preference.HtcPreferenceScreen>
<com.htc.preference.HtcCheckBoxPreference android:persistent="false" android:title="@string/bluetooth_quick_toggle_title" android:key="toggle_bluetooth" android:summary="@string/bluetooth_quick_toggle_summary" />
<com.htc.preference.HtcPreferenceScreen android:title="@string/bluetooth_settings_title" android:key="bt_settings" android:summary="@string/bluetooth_settings_summary">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.bluetooth.BluetoothSettings" />
</com.htc.preference.HtcPreferenceScreen>
<com.htc.preference.HtcCheckBoxPreference android:persistent="false" android:title="@string/hotspot_toggle_preference_title" android:key="enable_wifi_ap" android:summary="@string/hotspot_toggle_preference_summery" />
<com.htc.preference.HtcPreferenceScreen android:title="@string/hotspot_settings_preference_title" android:key="hotspot_settings" android:summary="@string/hotspot_settings_preference_summery">
<intent android:targetPackage="com.htc.WifiRouter" android:action="android.intent.action.MAIN" android:targetClass="com.htc.WifiRouter.Intro" />
</com.htc.preference.HtcPreferenceScreen>
<com.htc.preference.HtcCheckBoxPreference android:persistent="false" android:title="@string/wimax_quick_toggle_title" android:key="toggle_wimax" android:summary="@string/wimax_quick_toggle_summary" />
<com.htc.preference.HtcPreferenceScreen android:title="@string/wimax_settings" android:key="wimax_settings" android:summary="@string/wimax_settings_summary" android:dependency="toggle_airplane">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.wimax.WimaxSettings" />
</com.htc.preference.HtcPreferenceScreen>
<com.htc.preference.HtcPreferenceScreen android:title="@string/vpn_settings_title" android:key="vpn_settings" android:summary="@string/vpn_settings_summary">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.vpn.VpnSettings" />
</com.htc.preference.HtcPreferenceScreen>
<com.htc.preference.HtcCheckBoxPreference android:persistent="false" android:title="@string/mobiledata_quick_toggle_title" android:key="toggle_mobiledata" android:summary="@string/mobiledata_quick_toggle_summary" android:dependency="toggle_airplane" />
<com.htc.preference.HtcPreferenceScreen android:title="@string/network_settings_title" android:key="toggle_mobilesettings" android:summary="@string/network_settings_summary" android:dependency="toggle_airplane">
<intent android:targetPackage="com.android.phone" android:action="android.intent.action.MAIN" android:targetClass="com.android.phone.Settings" />
</com.htc.preference.HtcPreferenceScreen>
<com.htc.preference.HtcCheckBoxPreference android:persistent="true" android:title="@string/internet_sharing_title" android:key="toggle_netsharing" android:summary="@string/internet_sharing_summary" android:defaultValue="false" />
<com.htc.preference.HtcPreference android:title="@string/is_type_title" android:key="toggle_netsharing_type" android:summary="@string/is_type_windows" />
<com.htc.preference.HtcCheckBoxPreference android:persistent="true" android:title="@string/internet_sharing_title_incredible" android:key="toggle_modemlink" android:summary="@string/modemlink_summary" android:defaultValue="false" />
<com.htc.preference.HtcPreference android:title="@string/modemlink_type_title" android:key="toggle_modemlink_type" android:summary="@string/modemlink_type_usb" />
<com.htc.preference.HtcCheckBoxPreference android:persistent="true" android:title="@string/PS" android:key="toggle_PS" android:summary="@string/PS_summary" android:defaultValue="false" />
</com.htc.preference.HtcPreferenceScreen>
Wow, the rickroll is very well hidden in this one. Great job!
Edit: [sarcasm]
intangibleDroid said:
Wow, the rickroll is very well hidden in this one. Great job!
Click to expand...
Click to collapse
There is no rickroll in this, I even posted the changes needed to make this on your own.
Fail on your part sir.
Awesome man. Gonna cook this in right now.
Sent from my ADR6400L using XDA App
@jcase: I was kidding. You are a great asset to the dev community and I was just trying to be funny.
intangibleDroid said:
@jcase: I was kidding. You are a great asset to the dev community and I was just trying to be funny.
Click to expand...
Click to collapse
I understand, but its a real mod and I don't want people to skip using it, and I didn't want to wait til tomorrow before putting it up.
chingy51o said:
Awesome man. Gonna cook this in right now.
Sent from my ADR6400L using XDA App
Click to expand...
Click to collapse
will this work on your rom chingy?
april fools?
Is anyone going to flash this and confirm??
no it will not since my rom is odex. im gonna add it in right now and test it out..
Um.... Thats the problem with April fools, kills your credibility.
I will flash and report.
edit: does exactly what it says. Its legit. Feel free to flash everyone.
Sent from my ADR6400L using Tapatalk
mcmillanje said:
Um.... Thats the problem with April fools, kills your credibility.
I will flash and report.
edit: does exactly what it says. Its legit. Feel free to flash everyone.
Sent from my ADR6400L using Tapatalk
Click to expand...
Click to collapse
lol. If anyone doubts, apply the patch by hand. I explained what it is in the original post.
Radio info on VirusROM
Thanks for the true mod. Works great on VirusROM senseless. Should definitely conserve battery. Great work.
jmiller98 said:
Thanks for the true mod. Works great on VirusROM senseless. Should definitely conserve battery. Great work.
Click to expand...
Click to collapse
Very Welcome.
Thanks for the good work sir, excellent addition.
Ha ha got me again lol
Just kidding don't want you to kill me lol
Sent from my ADR6400L using XDA App
mcmillanje said:
Um.... Thats the problem with April fools, kills your credibility.
Click to expand...
Click to collapse
Awww someone doesn't take rickrolling well
I'm sure google lost billions of users today because their credibility came into question on this the first of april
this is not a signature I type it in every time maybe sent from my phone or my computer
rizzomegav said:
Awww someone doesn't take rickrolling well
I'm sure google lost billions of users today because their credibility came into question on this the first of april
this is not a signature I type it in every time maybe sent from my phone or my computer
Click to expand...
Click to collapse
What did google do???? I definitely missed that one. Was it the gmail motion?? That **** looks hilarious
And thanks again jcase for this and everything
WormDoes said:
What did google do???? I definitely missed that one. Was it the gmail motion?? That **** looks hilarious
And thanks again jcase for this and everything
Click to expand...
Click to collapse
Google actually did a bunch of things... http://en.wikipedia.org/wiki/Google's_hoaxes#2011 some are pretty good
Works well on Das Bamf 1.3, thanks for this! Don't have any 4g where I live, but make make lots of visits to NYC so this makes things a lot easier to switch back and forth!!
Was wondering if someone could tell me how to deodex my stock odex rom?
Sent from my ADR6400L using XDA App

[REQ][DEV] Can someone edit this for me?

I need to remove the clock from my status bar, I know that it's /res/layout/tw_status_bar.xml but I can't decompile anything to save my life, it's getting in the way of my theme! Can someone help me out, thanks!
I believe this line needs to be removed:
<com.android.systemui.statusbar.policy.Clock android:textSize="19.0dip" android:textColor="#ffa6a6a6" android:gravity="left|center" android:id="@id/clock" androidaddingLeft="3.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:includeFontPadding="false" />
please post your log, so we can see the problem on why you cant decompile, i also had something in my theme, stoping it from recompiling, then i took a look at the log, with some help from my fellow xda users, so maybe i can help you, because i got this log thing down now, once its out of your theme, you can compile and recompile freely
I don't know how, that's why I can't decompile it!
Sent from my GT-I9100 using xda app-developers app
Installing framework-res.apk is needed for decompiling systemui
Try "apktool if framework-res.apk"
PS. Don't use apk manager. Use the real apktool
Sent from my GT-I9100 using xda premium

[Q] Any solutions on how to remove 5 toggles on Stock ROM

Hello guys, specially for Themers.
Anyone of you knows how to remove the toggles on the statusbar expanded? If anyone could help me that could be highly appreciated.
Dunno if this working or not but u can try this...
Quickpanel_quick_setting.xml change every framelayout height to "0.0dip"
Sent from my GT-S5360 using Tapatalk 2
Try this:
in the Quickpanel_quick_setting.xml
Look for
Code:
<LinearLayout android:orientation="vertical" android:focusable="false" android:layout_width="fill_parent" android:layout_height="@dimen/quick_setting_button_height">
replace
Code:
android:layout_height="@dimen/quick_setting_button_height"
with this
Code:
android:layout_height="0.0dip"
hope it works
remember to make a backup though
d3cka said:
Dunno if this working or not but u can try this...
Quickpanel_quick_setting.xml change every framelayout height to "0.0dip"
Sent from my GT-S5360 using Tapatalk 2
Click to expand...
Click to collapse
DarkZied said:
Try this:
in the Quickpanel_quick_setting.xml
Look for
Code:
<LinearLayout android:orientation="vertical" android:focusable="false" android:layout_width="fill_parent" android:layout_height="@dimen/quick_setting_button_height">
replace
Code:
android:layout_height="@dimen/quick_setting_button_height"
with this
Code:
android:layout_height="0.0dip"
hope it works
remember to make a backup though
Click to expand...
Click to collapse
nope, neither worked. @DarkZied There's no LinearLayout in statusbar_expanded.xml. There's framelayout. Changed that wo 0.0dip, didn't work as well
Just add lidroid 15 toggles, then go into settings and uncheck every toggle.
Sent from my GT-S5830i - Hit thanks if I helped

Setup a Email Link

Hi there, looking to see if anyone knows how to set a email link from XML Coding?
Cheers
t3hShmo said:
Hi there, looking to see if anyone knows how to set a email link from XML Coding?
Cheers
Click to expand...
Click to collapse
Hi,
For TextView you can use android:autoLink = "email" property.
Something like this:
Code:
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autoLink="email"
android:text="[email protected]" />
strings.xml
Code:
<string name="my_email_link"> send an <a href=mailto:[email protected]>Email</a> to developer</string>
. Then create textview, and setText() to example string.
Noted to self thrice via tapatalk

[QUESTION] Change settings icons with theme. How make it?

Hi!
I want make new theme for LG Launcher and I want change icons in settings app (Display, Sound etc). How do this without edit LGSettings.apk and without edit LGEasySettings?
I tried add strings in \res\xml\theme_resource.xml
Example:
Code:
<AppIcon name="com.android.settings/com.android.settings.DisplaySettings" image="settings_display" />
<AppIcon name="com.android.settings/com.android.settings.Settings$DisplaySettingsActivity" image="settings_display" />
<AppIcon name="com.android.settings/com.android.settings.lge.PouchSettings" image="settings_display" />
<AppIcon name="com.android.settings/com.android.settings.lge.ScreenMode" image="settings_display" />
But icons not change (2nd screenshot), icons change only in top tittle (1st screenshot)
x-zes said:
Hi!
I want make new theme for LG Launcher and I want change icons in settings app (Display, Sound etc). How do this without edit LGSettings.apk and without edit LGEasySettings?
I tried add strings in \res\xml\theme_resource.xml
Example:
Code:
<AppIcon name="com.android.settings/com.android.settings.DisplaySettings" image="settings_display" />
<AppIcon name="com.android.settings/com.android.settings.Settings$DisplaySettingsActivity" image="settings_display" />
<AppIcon name="com.android.settings/com.android.settings.lge.PouchSettings" image="settings_display" />
<AppIcon name="com.android.settings/com.android.settings.lge.ScreenMode" image="settings_display" />
But icons not change (2nd screenshot), icons change only in top tittle (1st screenshot)
Click to expand...
Click to collapse
That isn't possible with a home theme. It would be cool if you could though.
App icons change wherever they are shown including the title/action bar so that's why it changes at the top.
Questions belong in Q&A section, for future reference. Welcome to the forum.
If try extract code and layouts from LGEasySettings.apk and put this code and layouts with change icons name in theme apk?
Is it possible to when apply theme with code from LGEasySettings.apk and work this from theme? In other words, insert LGEasySettings.apk in theme.
x-zes said:
If try extract code and layouts from LGEasySettings.apk and put this code and layouts with change icons name in theme apk?
Is it possible to when apply theme with code from LGEasySettings.apk and work this from theme? In other words, insert LGEasySettings.apk in theme.
Click to expand...
Click to collapse
I finally did changing the png's:
http://www.htcmania.com/showthread.php?t=811479
I can somebody replace icons in LGEasySettings.apk and LGSettings.apk. But I want replace icons when apply my theme without edit LGEasySettings.apk and LGSettings.apk
x-zes said:
I can somebody replace icons in LGEasySettings.apk and LGSettings.apk. But I want replace icons when apply my theme without edit LGEasySettings.apk and LGSettings.apk
Click to expand...
Click to collapse
When it comes to mod something you got to make some ultimate changes in order to get it your way.
If you don't wanna mess around, then there is one solution: go to Hogwarts become a magician
x-zes said:
I can somebody replace icons in LGEasySettings.apk and LGSettings.apk. But I want replace icons when apply my theme without edit LGEasySettings.apk and LGSettings.apk
Click to expand...
Click to collapse
Not possible. The only way I can think to edit the pngs without editing LGEasySettings.apk and LGSettings.apk is with an xposed module.
Hi could you please tellme which file you edited to make the settings menu, black? Thanks in advance
Sent from my LG-E980 using XDA Free mobile app

Categories

Resources