[4.2] [QuickSettings] How to add new toggles to 4.2 Android - Android

This is just going to be a quick rundown on what do to add new toggles to android new QuickSettings system. This will take place in SystemUI.
Custom QuickSettings Toggles
{
"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"
}
Path: frameworks/base/packages/SystemUI
Files:
src/com/android/systemui/statusbar/phone/QuickSettings.java
There are two options when creating a toggle.
addSystemTiles:380 - Static tiles with useful information.
addTemporaryTiles:571 - This type of tile will get removed without activity, for example, the alarm quick setting is a temp tile.
I used SystemTiles
Code:
// CpuInfo tile
QuickSettingsTileView cpuInfoTile = (QuickSettingsTileView)
inflater.inflate(R.layout.quick_settings_tile, parent, false);
cpuInfoTile.setContent(R.layout.quick_settings_tile_cpuinfo, inflater);
cpuInfoTile.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startSettingsActivity(Intent.ACTION_POWER_USAGE_SUMMARY);
}
});
mModel.addCpuInfoTile(cpuInfoTile, new QuickSettingsModel.RefreshCallback() {
@Override
public void refreshView(QuickSettingsTileView view, State state) {
ImageView iv = (ImageView) view.findViewById(R.id.cpuinfo_image);
TextView tva = (TextView) view.findViewById(R.id.cpuinfoa_textview);
TextView tvb = (TextView) view.findViewById(R.id.cpuinfob_textview);
Drawable d = mContext.getResources().getDrawable(R.drawable.ic_settings_performance);
String GOV = fileReadOneLine(GOV_FILE);
String FREQ = fileReadOneLine(SCALE_CUR_FILE);
iv.setImageDrawable(d);
tva.setText(GOV);
tvb.setText(FREQ);
view.setContentDescription(
mContext.getString(R.string.accessibility_quick_settings_cpuinfo, GOV));
}
});
parent.addView(cpuInfoTile);
src/com/android/systemui/statusbar/phone/QuickSettingsModel.java:174
This is needed for the widget inside the toggle to get updated. You can view other definitions in here to update various states.
Code:
private QuickSettingsTileView mCpuInfoTile;
private RefreshCallback mCpuInfoCallback;
private State mCpuInfoState = new State();
res/layout/quick_settings_tile_cpuinfo.xml
This is where we create the layout of the tile and call it from java.
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/cpuinfo_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingBottom="10dp"
/>
<TextView
style="@style/TextAppearance.QuickSettings.TileView"
android:id="@+id/cpuinfoa_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="#287AA9"
android:gravity="center"
/>
<TextView
style="@style/TextAppearance.QuickSettings.TileView"
android:id="@+id/cpuinfob_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="#287AA9"
android:gravity="center"
/>
</LinearLayout>
res/values/strings.xml
Needed to setContentDescription()
Code:
<string name="accessibility_quick_settings_cpuinfo">CpuInfo <xliff:g id="meminfo" example="CpuInfo">%s</xliff:g>.</string>
I know this is a very general overview, but the actuality is there is so much that can be done with this, it would be hard to go into extreme detail. Would be better to just simply leave that stuff for questions in this thread.
If you want to know more, please just ask. Lets make android OURS!​

Would root be required to implement this?
Sent from my SGH-I997 using xda premium

marty331 said:
Would root be required to implement this?
Sent from my SGH-I997 using xda premium
Click to expand...
Click to collapse
It would be since you have to push the file back onto the system.

Hi , great tutorial:thumbup:
Can you show us the smali version?
Thanks

Ofeliax said:
Hi , great tutorial:thumbup:
Can you show us the smali version?
Thanks
Click to expand...
Click to collapse
No idea, I have no experience using smali. You can just compile SystemUI from source.

Lithid ur the man. Once I can get this inline kernel building accomplished for aosp for my device, I can compile it. Then I will be playing with this for sure!! I can't wait!

lithid-cm said:
It would be since you have to push the file back onto the system.
Click to expand...
Click to collapse
Or just create a flashable zip. Then flash the new modded app

Peteragent5 said:
Or just create a flashable zip. Then flash the new modded app
Click to expand...
Click to collapse
Not really the point of this thread.

Geest tutorial, this is gonna be my first thing to do when I come back from school lol!
Sent from my Galaxy Nexus using Tapatalk 2

How did you decompile your SystemUI?
When I try to do that with mine it's giving an error ..
Sent from my Galaxy Nexus using Tapatalk 2

mDroidd said:
How did you decompile your SystemUI?
When I try to do that with mine it's giving an error ..
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
From source.
Code:
time make -j8 SystemUI

Will this work with CM10 4.1.2?

No, 4.2 only, as stated by OP
Sent from my Galaxy Nexus using Tapatalk 2

Mlopik said:
Will this work with CM10 4.1.2?
Click to expand...
Click to collapse
mDroidd said:
No, 4.2 only, as stated by OP
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
I'd assume he process would be very similar as cm is based off aosp...
Anyways I'm currently downloading the 4.2 aosp, gonna be making (trying) my own rom and will definitely be using this guide in the near future after Im sure I can get everything built. Thanks for the guide, if I'm successfully with what I plan to do, you will definitely be linked and credited.
Sent from my SGH-I997 using Tapatalk 2

mg2195 said:
I'd assume he process would be very similar as cm is based off aosp...
Anyways I'm currently downloading the 4.2 aosp, gonna be making (trying) my own rom and will definitely be using this guide in the near future after Im sure I can get everything built. Thanks for the guide, if I'm successfully with what I plan to do, you will definitely be linked and credited.
Sent from my SGH-I997 using Tapatalk 2
Click to expand...
Click to collapse
I was thinking about putting myself in front of a rom recently. If you are at all interested in teaming up for a rom project, PM. You seem legit and wouldn't mind it one bit.

This is badass!! Thank you so much lithid!!!!
EDIT: Question, What are the numbers representing?
addSystemTiles:380
addTemporaryTiles:571
Click to expand...
Click to collapse
I assumed they were line numbers but when I checked source it didn't look like anything was referring to addSystemTiles or addTemporaryTiles on those line numbers.

I might have to revisit that, those line numbers are from my file, which is already been edited.
Sent from my Galaxy Nexus using xda premium

lithid-cm said:
I might have to revisit that, those line numbers are from my file, which is already been edited.
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
Makes sense. Thanks.

nice tutorial
btw, 4.1.2 and 4.2.1 quicksettings are not same dear Mlopik.

You can do this with stock 4.2.1 (rooted) ?

Related

[SMALI GUIDE] How to add extended Quicksettings

As many GSM Users may noticed ther is not much development in the GSM section yet - hope it's just because the kernel sources aren't released yet..
So there was still missing a extended notification bar for GSM Users.
I tried to get the extended Quicksettings from a cdma rom and some themes...but everytime i got bootloops, or my statusbar was missing.
Seems, that the gsm and cdma framework is a bit different...
After much blabla, here my guide, how to add your own extenden quicksettings bar yourself.
I've tested it on mdj's GSM virtuous rom..so if you want, you can just grab it and press the Thanks button =P.
May work also on other gsm roms.
Before trying this out, pls ensure, you`ve got a working cwm backup, I'm not responsible if you lose any data, because you didn't make one.
This is my Quicksettingsbar
{
"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"
}
..so let's begin.
Requirements:
apktool for decompiling and compiling:
Download
For windows:
apktool-install-windows-r04-brut1.tar.bz2
and
apktool1.4.1.tar.bz2
Click to expand...
Click to collapse
notepad++ for comparing files
Download
7Zip or something similar
Download
Steps to get your extendend Quicksettingbar
1. Extract the downloaded apktool files to the same folder
2. Pull required files from device
located under system/framework
com.htc.resources.apk
located under system/app
SystemUI.apk
Put it to the extracted apktool files:
3. Install ressources.apk
- open the cmd and browse to the apktool folder
- type:
apktool if com.htc.resources.apk
Click to expand...
Click to collapse
in cmd
4.Decompiling
- type:
apktool d SystemUI.apk
Click to expand...
Click to collapse
in cmd
5. Edit quick_settings.xml
It's located unter SystemUI/res/layout:
..and it should look like:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.preference.QuickSettings android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<TextView android:textAppearance="?android:textAppearanceLarge" android:textSize="@dimen/status_bar_title_font_size" android:textColor="#ffffffff" android:gravity="center_vertical" android:id="@id/title_bar" android:background="@drawable/status_bar_header_background" android:paddingLeft="9.0sp" android:layout_width="fill_parent" android:layout_height="wrap_content" android:scaleType="fitXY" android:text="@string/status_bar_quick_settings" />
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<include android:id="@id/volume" layout="@layout/status_bar_preference" />
<include android:id="@id/brightness" layout="@layout/status_bar_preference" />
<include android:id="@id/rotation" layout="@layout/status_bar_preference" />
<include android:id="@id/wifi" layout="@layout/status_bar_preference" />
<include android:id="@id/hotspot" layout="@layout/status_bar_preference" />
<include android:id="@id/network" layout="@layout/status_bar_preference" />
<include android:id="@id/bluetooth" layout="@layout/status_bar_preference" />
<include android:id="@id/gps" layout="@layout/status_bar_preference" />
<include android:id="@id/settings" layout="@layout/status_bar_preference" />
<include android:id="@id/task_manager" layout="@layout/status_bar_preference" />
</LinearLayout>
</ScrollView>
</com.android.systemui.statusbar.preference.QuickSettings>
Please copy the whole code and overwrite it with your existing one.
You can rearrange the different settings like you want.
But DON'T delete a line!
6. The funny part, edit the f** smali file, costs me days! =D
Download the attached Quicksettings.zip and extract it somewhere, and open it with noetpad++.
Now navigate to your decompiled SystemUI.apk:
.../SystemUI\smali\com\android\systemui\statusbar\preference
Click to expand...
Click to collapse
...and open the Quicksettings.smali here in notepad too:
Click on Addons->Compare->Compare: (Don't know the exact translation)
..after then it should look like this:
Explanations:
notepad++ compares both files and marks the differences, what we have to do know, is to go trough this differences and adapt our file with mine.
But attention!
Don' adapt the ressource id's, how ressource ids looks like is shown in the picture. If you change them, it won't work and will cause some bootloops and a missing statusbar.
The ressource ids are listed in the public.xml (.../SystemUI/res/values) and have to match with the ids in the code.
One example:
Let's search for an ID, to do this double click on an id, press Ctrl+Shift+F, browse to ".../SystemUI", then search:
As you can see, the id from your quicksettings smali is linked to other files, so changing them isn't good thing
So lets see for important differences, you need to change:
NOT THE ID's =P
You need really to change everything EXCEPT the Ressource ID's
Breaks and different row numbers are irrelevant.
After you are ready, save the file and make the diff again:
Addons->Compare->Compare
...to ensure, you got all changes and ONLY the Ressource ID's are different.
6. Compiling:
-Type:
apktool b SystemUI SystemUI_new.apk
Click to expand...
Click to collapse
in cmd
8.7zip/Winrar
-open both, the orignal and the new SystemUI.apk's and drag&drop the classes.dex from SystemUI_new to SystemUI and overwrite it
Do the same with the the file quick_settings.xml located under .../SystemUI/res/layout
Now transfer the SysytemUI.apk back to your device.
Paste it, i have used root explorer, in /system and change the permissons to 644 (just like all in system/app).
After setting the correct permission, overwrite the original SystemUI.apk in System/app with yours.
Or just push it via ab in /system/app
Reboot, done:
Pls don't post here, if it don't work for the first time..just try it a second time..and perhaps a third time.
Believe me, to understand how this all works and get all this working I spend a lot of time.
I've got no experience in decompiling and smali editing before, okay, I'm a c# and c++ coder, so perhaps it was a bit easier to me...what i want to say with that DON'T give up, when it doesnt work at the first go (;
...if someone post his 2.3.3 or 2.3.4 SystemUI.apk for me, I can attach the modified SytemUI.apk in the OP.
But before i can attach them, someone need to test hem first
j4n87 said:
As many GSM Users may noticed ther is not much development in the GSM section yet - hope it's just because the kernel sources aren't released yet..
So there was still missing a extended notification bar for GSM Users.
I tried to get the extended Quicksettings from a cdma rom and some themes...but everytime i got bootloops, or my statusbar was missing.
Seems, that the gsm and cdma framework is a bit different...
After much blabla, here my guide, how to add your own extenden quicksettings bar yourself.
I've tested it on mdj's GSM virtuous rom..so if you want, you can just grab it and press the Thanks button =P.
May work also on other gsm roms.
Click to expand...
Click to collapse
h there.. i got 2 questions for you:
1) i got tmobile gsm with an unlocked and rooted phone. will this work on the 'virtuous unity' ROM 2.35 with sense 3.0?
2) is there a more simpler way of adding extensions? theres got to be.
trapzz said:
h there.. i got 2 questions for you:
1) i got tmobile gsm with an unlocked and rooted phone. will this work on the 'virtuous unity' ROM 2.35 with sense 3.0?
2) is there a more simpler way of adding extensions? theres got to be.
Click to expand...
Click to collapse
I'm new to Android and use a CDMA device so I can't help you with your first question, but as far as no. 2... I doubt there's an easier way (to do it yourself). One thing I've learned about Android thus far is that modding it is a pain in the ass all around.
sharkie405 said:
I'm new to Android and use a CDMA device so I can't help you with your first question, but as far as no. 2... I doubt there's an easier way (to do it yourself). One thing I've learned about Android thus far is that modding it is a pain in the ass all around.
Click to expand...
Click to collapse
thanks.. and i agree.. modding on an android is a pain. right now, i'm looking into how to increase the system font of my phone, especially, on my stock sms. i wish i knew how though.
trapzz said:
h there.. i got 2 questions for you:
1) i got tmobile gsm with an unlocked and rooted phone. will this work on the 'virtuous unity' ROM 2.35 with sense 3.0?
2) is there a more simpler way of adding extensions? theres got to be.
Click to expand...
Click to collapse
If there is already a rom with 2.3.5 gsm with extendend quicksettings, you can just copy the SystemUI.apk to you rom.
If not, you have to port it yourself as described in the 1st post.
My suggestion would be to decompile your 2.3.5 rom and one 2.3.4/2.3.3 rom/theme with extended quicksetiings already included and decompile both.
Now have compare /res/values/id.xml and public xml from both roms. If they match you can just copy the quicksettings.smali and add it to your rom.
If you want, you can post me your SystemUI.apk of your sense rom and I try my best to get it working
Edit: to increase system font size you can use spare parts from market
trapzz said:
thanks.. and i agree.. modding on an android is a pain. right now, i'm looking into how to increase the system font of my phone, especially, on my stock sms. i wish i knew how though.
Click to expand...
Click to collapse
btw..can you post me the link to the rom yo are talking about?
Where is a GSM virtuous unity 2.3.5 bases Sense 3.0 rom?
@j48n7
thanks for the detailed guide
I am using a runnymede port (sense 3.5) on desire without the full quick settings menu in the dropdown. I tried to enable all the options on the menu using your guide, but it didnt work out. The sense 3 QS was very different from sense 3.5 QS smali..
So i extracted the QS smali from another sense 3.5 rom (bliss for evo 3d) with all options enabled.. will use it as per your guide.
sorry for the long rant, my question is that would it be feasible to just replace the smali on my phone? or would there be some impact of different phone models
I am not at all versed with smali..
schandra1480 said:
@j48n7
thanks for the detailed guide
I am using a runnymede port (sense 3.5) on desire without the full quick settings menu in the dropdown. I tried to enable all the options on the menu using your guide, but it didnt work out. The sense 3 QS was very different from sense 3.5 QS smali..
So i extracted the QS smali from another sense 3.5 rom (bliss for evo 3d) with all options enabled.. will use it as per your guide.
sorry for the long rant, my question is that would it be feasible to just replace the smali on my phone? or would there be some impact of different phone models
I am not at all versed with smali..
Click to expand...
Click to collapse
Yeah, it is possible to just copy the quicksettings.smali, but you have to ensure, that all resource ids match with your ressource ids in your res/values/public.xml.
You also have to add the smali files in statusbar/preferences which are missing in your project - here you also have to ensure, that the resource ids match.
Also make a diff of res/values/strings.xml, id.xml and res/layout/quicksettings.xml
Thanks OP! Are any of the zips you attached flashable?
The pictures are down for this, can you put them up again please
Yeah, accidently deleted them :-s
...but I think theres no need to do this stuff on your own.
Nearly all roms got them already included or there are themes out with em.
Someone who wants to port this to another device where are no extended quicksettings at the moment should have enough know how to do this witouth this tutorial/pics in this tutorial.
On the device i have, incredible 2, all the roms that include extra quick settings also change other things. I like my basically stock rom, but i would like to have the extra settings close.
And i am only asking for the two bottom pictures that are part of the step 6, because they show steps and are not just examples of what you wrote out.
p.s. if i mess up i will not ask for help, as you are right that i dont know enough but i would like to try. So i will not take up any of your time
..just copy the SystemUI\smali\com\android\systemui\statusbar\preference folder to your systemui from a systemui with extended quicksettings.
same goes for res/layout and res/values
..and continue with the next steps.
Should work
Sent from my HTC EVO 3D X515m using xda premium
If you got problems or need help, just pm me
I will when I get the time to, I had a heavy week in school. Will try today when I get home.
How to mod HTC Sense 3.5 Quick Settings?
Hey j4n87 - thanks for the tutorial on Quick Settings - this is the most comprehensive thing I've found on the web.
I am trying to do the same thing for my HTC Thunderbolt here in the US. I am on CDMA, but it seems different in Sense 3.5. I was wondering if you have any wisdom to share with me
Steps I've done so far:
using APK Manager 5.0.2 decompiled SystemUI.apk with dependencies (option 10)
dragged com.htc.resources.apk as the dependency
compared SystemUI.apks from the original ROM, and one with Quick Settings I like
found resources pointing to needing to edit QuickSettings.xml and the QuickSettings.smali
read up on ViewStub, which looks like it's being used instead of include for the QuickSettings.xml in Sense 3.5
So I can't tell what is used to inflate the ViewStubs in QuickSettings.xml which is what I presume I need to do to get all the quick settings I need.
Any help would be greatly appreciated! Sorry for the long-winded post...
shenaenae said:
Hey j4n87 - thanks for the tutorial on Quick Settings - this is the most comprehensive thing I've found on the web.
I am trying to do the same thing for my HTC Thunderbolt here in the US. I am on CDMA, but it seems different in Sense 3.5. I was wondering if you have any wisdom to share with me
Steps I've done so far:
using APK Manager 5.0.2 decompiled SystemUI.apk with dependencies (option 10)
dragged com.htc.resources.apk as the dependency
compared SystemUI.apks from the original ROM, and one with Quick Settings I like
found resources pointing to needing to edit QuickSettings.xml and the QuickSettings.smali
read up on ViewStub, which looks like it's being used instead of include for the QuickSettings.xml in Sense 3.5
So I can't tell what is used to inflate the ViewStubs in QuickSettings.xml which is what I presume I need to do to get all the quick settings I need.
Any help would be greatly appreciated! Sorry for the long-winded post...
Click to expand...
Click to collapse
Mhh, i think I would take a look at the sensation or evo 3d cdma forum for a sense 3.5 rom with extended quicksettings and use this as base instead the one in the op.
didnt work with sense 3.5 yet, sry. Will take a look at it tomorrow.
Sent from my HTC EVO 3D X515m using xda premium
Hey,
Love you guide. I have a rom that has few extended settings and i want to add more from another rom. I'm almost done (thanks to your guide). Please put the pictures back! It might help others
pix down. reup???

[MOD] Various Carrier Label Style

I dont know if there's any other thread has been created for this but i didnt see it.
So just want to share this little thing to whoever want it. Anyone are welcome to improvise it and make it even better/nicer.
This is just one quick mod i did during my 1 hour lunch time.
This only for stock ROM or Custom ROM based on STOCK. You already have "compact carrier label" features if you are using cm7.
NOTE: 1st thing 1st, please BACKUP the file that we will change (SystemUI.apk from /system/app/)!
STYLE #1:
How it looks:
{
"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"
}
The "No notification" and "On going" Title is covered by carrier label intentionally.
The easy way:
- Download the file from attachment,extract it and put the compiled xml file inside into your SystemUI.apk at res/layout/
- if you are linux user, then just open that apk file, drag and drop that xml to the stated folder (res/layout)
- I dont know how to do it from windows box since i didnt use windows but i believe you need to open the apk using 7zip.
DIY way (you need to know how to use apktool, decompiling/recompiling an apk. It is easy, trust me ):
If you wish to do it yourself, then you need to decompile SystemUI.apk.
(i use apktool and method by TheGrammarFreak HERE that also applied for centering the date and clock)
- open status_bar_expanded.xml from layout folder.
- on the line 4, you will see
Code:
<LinearLayout android:orientation="horizontal" 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">
highlight the whole line until line 7 that consist
Code:
</LinearLayout>
and delete it (yes, delete!)
so it will looks like these
find line start with
Code:
<LinearLayout android:orientation="vertical" android:id="@id/latestItems"
create new line below it and paste this code into that new line
Code:
<TextView android:layout_gravity="right|center" android:id="@id/clear_all_button" android:background="@android:drawable/btn_default_small" 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="?android:attr/buttonStyle" />
That is for "clear button". We repositioned it to the bottom.
Now, find line consist
Code:
</ScrollView>
and paste these code exactly below it
Code:
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<com.android.systemui.statusbar.CarrierLabel android:textAppearance="@style/TextAppearance.StatusBar.Title" android:gravity="bottom|center|center" android:background="@drawable/shade_bgcolor" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
</LinearLayout>
It should look like this;
That is for the Carrier Label. I made it centered by this line
Code:
android:gravity="bottom|center|center"
Save it and recompile back. I use TheGrammarFreak method to replace the compiled xml file.
Enjoy..
STYLE #2:
How it looks like:
How to apply:
Download file carrier_label_mod2.zip in attachment,
unzip/extract it,
drag and drop files extracted into your SystemUI.apk, inside folder res / layout
** Lazy to add ** Ask me if anyone want to try it themself, want to change any line etc. **
feed3 said:
I dont know if there's any other thread has been created for this but i didnt see it.
So just want to share this little thing to whoever want it. Anyone are welcome to improvise it and make it even better/nicer.
This is just one quick mod i did during my 1 hour lunch time.
This only for stock ROM. You already have "compact carrier label" features if you are using cm7.
NOTE: 1st thing 1st, please BACKUP the file that we will change (SystemUI.apk from /system/app/)!
How it looks:
The "No notification" and "On going" Title is covered by carrier label intentionally.
The easy way:
- Download the file from attachment,extract it and put the compiled xml file inside into your SystemUI.apk at res/layout/
- if you are linux user, then just open that apk file, drag and drop that xml to the stated folder (res/layout)
- I dont know how to do it from windows box since i didnt use windows but i believe you need to open the apk using 7zip.
DIY way (you need to know how to use apktool, decompiling/recompiling an apk. It is easy, trust me ):
If you wish to do it yourself, then you need to decompile SystemUI.apk.
(i use apktool and method by TheGrammarFreak HERE that also applied for centering the date and clock)
- open status_bar_expanded.xml from layout folder.
- on the line 4, you will see
Code:
<LinearLayout android:orientation="horizontal" 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">
highlight the whole line until line 7 that consist
Code:
</LinearLayout>
and delete it (yes, delete!)
so it will looks like these
find line start with
Code:
<LinearLayout android:orientation="vertical" android:id="@id/latestItems"
create new line below it and paste this code into that new line
Code:
<TextView android:layout_gravity="right|center" android:id="@id/clear_all_button" android:background="@android:drawable/btn_default_small" 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="?android:attr/buttonStyle" />
That is for "clear button". We repositioned it to the bottom.
Now, find line consist
Code:
</ScrollView>
and paste these code exactly below it
Code:
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<com.android.systemui.statusbar.CarrierLabel android:textAppearance="@style/TextAppearance.StatusBar.Title" android:gravity="bottom|center|center" android:background="@drawable/shade_bgcolor" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
</LinearLayout>
It should look like this;
That is for the Carrier Label. I made it centered by this line
Code:
android:gravity="bottom|center|center"
Save it and recompile back. I use TheGrammarFreak method to replace the compiled xml file.
Enjoy..
Click to expand...
Click to collapse
Hey could you attach your statusbar.xml with centered date?
Thank you
Black_jackss said:
Hey could you attach your statusbar.xml with centered date?
Click to expand...
Click to collapse
Sure.. SystemUI.apk attached. But, it is a bit messed inside.
and, many things are added to my like such as statusbar background. Im pretty sure you know which xml file to take if you only need the centered clock and date right?
As a side note, the background for date when you expand the statusbar will be black because i dont like it being overlapping with other icons,clock etc. Let me know if you need to find which line to change for that.
EDIT: Opss.. didnt read your post carefully. My head become a bit blur for the very long hours in front of my workstation. statusbar.xml in zip file attached.
meme nin said:
Thank you
Click to expand...
Click to collapse
Welcome..
feed3 said:
Sure.. SystemUI.apk attached. But, it is a bit messed inside.
and, many things are added to my like such as statusbar background. Im pretty sure you know which xml file to take if you only need the centered clock and date right?
As a side note, the background for date when you expand the statusbar will be black because i dont like it being overlapping with other icons,clock etc. Let me know if you need to find which line to change for that.
EDIT: Opss.. didnt read your post carefully. My head become a bit blur for the very long hours in front of my workstation. statusbar.xml in zip file attached.
Click to expand...
Click to collapse
I edited a few line,hope u will be okay with that,
Thanks,im so lazyyy
Black_jackss said:
I edited a few line,hope u will be okay with that,
Thanks,im so lazyyy
Click to expand...
Click to collapse
Totally okay with it.. Im not the one who invent it and this xda is exist initially for sharing, isnt it?
Care to share what you have changed? How does it look?
feed3 said:
Totally okay with it.. Im not the one who invent it and this xda is exist initially for sharing, isnt it?
Care to share what you have changed? How does it look?
Click to expand...
Click to collapse
I reverted it back,because it's not like i want
Thanks man
Black_jackss said:
I reverted it back,because it's not like i want
Thanks man
Click to expand...
Click to collapse
I assume you made the carrier background to transparent, then align it to the right (to make it exactly like in cm7)?
I have done it before, but once you have many notifications, it will just stay there (i dont like it), but putting it into scrollview doesnt work either. Thats why I made it just centered since "no notification" and "on going" title doesnt serve any purpose to me personally.
Sent from my SK17i using XDA App
feed3 said:
I assume you made the carrier background to transparent, then align it to the right (to make it exactly like in cm7)?
I have done it before, but once you have many notifications, it will just stay there (i dont like it), but putting it into scrollview doesnt work either. Thats why I made it just centered since "no notification" and "on going" title doesnt serve any purpose to me personally.
Sent from my SK17i using XDA App
Click to expand...
Click to collapse
Close one
Please continue sharing the progress in ths thread
Sent from my SK17i
Black_jackss said:
Close one
Please continue sharing the progress in ths thread
Sent from my SK17i
Click to expand...
Click to collapse
Sure.. I just dont have many free times in hand..
Sent from my SK17i using XDA App
Another style for carrier label added to the first post (scroll to the bottom of the first post to see how it looks like). Files required are attached as well in the first post.

[ROM][GT-I9100][WIP] Ubuntu Touch Developer Preview

Ubuntu Touch Developer Preview
for GT-I9100​
Keep in mind that this is only a developer preview, and will probably not function as an everyday ROM.
I will not be responsible for any damage caused by flashing this ROM or anything related.
Downloads:
Download the following and put them on your sdcard:
(deprecated) saucy-preinstalled-touch-armel-i9100.zip / (Google Drive mirror)
cm-10.1-20131129-UNOFFICIAL-i9100.zip (Diamond5170's build)
trusty-preinstalled-touch-armhf.zip
Optionally (but preferably) control the md5 checksums:
(deprecated) saucy-preinstalled-touch-armel-i9100.zip.md5sum / (Google Drive mirror)
MD5SUMS
Flashing instructions:
wipe data/factory reset (Make backup first)
flash cm-10.1-********-UNOFFICIAL-i9100.zip
flash trusty-preinstalled-touch-armhf.zip
reboot
(optional) Try to enable 3G data (link)
Current status:
Not working (specific to this device):
Calls/SMS
Audio
Sensorservice problem after reboot
solve by adding to /etc/rc.local:
Code:
./system/bin/sensorservice &
(Diamond5170's original post)
3G data might work if you follow this guide:
https://plus.google.com/100264483712374857174/posts/3o1tjYo9Ghx
Click to expand...
Click to collapse
Please report what's working and not in this thread to complete this list.
Screenshots:
{
"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"
}
Screenshots by IconRunner, see http://imgur.com/a/LL53v for more.
Screenshots by aryan1312, see http://forum.xda-developers.com/showpost.php?p=39087781&postcount=11 for more.
Repos:
The Github repos for this device can be found here:
https://github.com/UbuntuTouch-smdk4210
If you wish to build an image yourself, do the following:
Set up your build environment
Run:
Code:
$ cd <project root>
$ repo init -u git://phablet.ubuntu.com/CyanogenMod/android.git -b phablet-trusty
Create file <project root>/.repo/local_manifests/roomservice.xml with the following contents:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="UbuntuTouch-smdk4210/android_device_samsung_i9100" path="device/samsung/i9100" remote="github" revision="refs/heads/phablet-saucy" />
<project name="UbuntuTouch-smdk4210/android_device_samsung_galaxys2-common" path="device/samsung/galaxys2-common" remote="github" revision="refs/heads/phablet-saucy" />
<project name="UbuntuTouch-smdk4210/android_kernel_samsung_smdk4412" path="kernel/samsung/smdk4412" remote="github" revision="refs/heads/phablet-saucy" />
<project name="UbuntuTouch-smdk4210/android_hardware_samsung" path="hardware/samsung" remote="github" revision="refs/heads/phablet-saucy" />
<project name="UbuntuTouch-smdk4210/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="refs/heads/phablet-saucy" />
</manifest>
Run:
Code:
$ repo sync
$ . build/envsetup.sh
$ brunch i9100
Now your flashable .zip file should be in <project root>/out/target/product/i9100/cm-10.1-********-UNOFFICIAL-i9100.zip
To update your working tree, run the following commands:
Code:
$ repo sync
$ . build/envsetup.sh
$ brunch i9100
You should now have a new flashable .zip file <project root>/out/target/product/i9100/cm-10.1-********-UNOFFICIAL-i9100.zip.
You might want to run 'make clean' or 'make clobber' before 'brunch i9100' to be certain that each change gets compiled.
MaxWallstedt said:
Ubuntu Touch Developer Preview
for GT-I9100​
Keep in mind that this is only a developer preview, and will probably not function as an every-day rom.
I will not be responsible for any damage caused by flashing this rom or anything related.
Download the following and put them on your sdcard:
Code:
https://dl.dropbox.com/u/44436922/cm-10.1-20130312-UNOFFICIAL-i9100.zip
and
Code:
http://cdimage.ubuntu.com/ubuntu-touch-preview/daily-preinstalled/current/quantal-preinstalled-phablet-armhf.zip
or
Code:
http://cdimage.ubuntu.com/ubuntu-touch-preview/quantal/mwc-demo/quantal-preinstalled-phablet-armhf.zip
Flashing instructions:
1. install CyanogenMod 10.1 on your device, if not already installed (http://forum.xda-developers.com/showthread.php?t=2036229)
2. wipe data/factory reset (Make backup first)
3. flash cm-10.1-20130312-UNOFFICIAL-i9100.zip
4. flash quantal-preinstalled-phablet-armhf.zip
5. reboot
Click to expand...
Click to collapse
Do we need to install hdpi_overlay?
alien0101 said:
Do we need to install hdpi_overlay?
Click to expand...
Click to collapse
There should be need for that anymore!
https://dl.dropbox.com/u/44436922/cm-10.1-20130312-UNOFFICIAL-i9100.zip
http://cdimage.ubuntu.com/ubuntu-to...urrent/quantal-preinstalled-phablet-armhf.zip
Just make the links work so people can use it directly.....thx...keeping this updated makes it much easier.
Sent from my GT-I9100 using xda premium
I don't mean to spam threads, but since all the action seems to have moved here I will repost. Do we keep recovery? Can we go back to cm10.1 without using Odin/Heimdall?
Enviado desde mi GT-I9100 usando Tapatalk 2
Awesome! Great job!
It would be nice to have a changelog tracing what works and what doesn't and what are the known issues.
juanono said:
I don't mean to spam threads, but since all the action seems to have moved here I will repost. Do we keep recovery? Can we go back to cm10.1 without using Odin/Heimdall?
Enviado desde mi GT-I9100 usando Tapatalk 2
Click to expand...
Click to collapse
Yes, you keep recovery (but with a nice ubuntu logo) and can restore your backups through it.
juanono said:
I don't mean to spam threads, but since all the action seems to have moved here I will repost. Do we keep recovery? Can we go back to cm10.1 without using Odin/Heimdall?
Enviado desde mi GT-I9100 usando Tapatalk 2
Click to expand...
Click to collapse
Since it's cm based, you'll keep recovery, so if you're done playing around with this, just wipe data & flash new rom!
Greetings
Sent from my GT-I9100 using xda app-developers app
any known bugs?
Fulfen said:
any known bugs?
Click to expand...
Click to collapse
Issues fonts and wifi are solved...its awesome
Sent from my GT-I9100 using xda premium
Snapshot
Here are few snapshot of Ubuntu touch :
I jst installed to files :
1st https://dl.dropbox.com/u/44436922/cm-10.1-20130312-UNOFFICIAL-i9100.zip
2nd http://cdimage.ubuntu.com/ubuntu-touch-preview/quantal/mwc-demo/
*Daily update files are causing some problem*
Even though gmail and facebook app opens, but they don't let u log in how much u try u will " error in password "
browser is working, from u can login in gmail but facebook opens in simple text format
Two finger gesture works fine on notification bar
app manager work fine
I think we have to move this to development section.
liawim said:
Issues fonts and wifi are solved...its awesome
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
phone and messaging works normally?
---------- Post added at 01:35 PM ---------- Previous post was at 01:27 PM ----------
deedii said:
I think we have to move this to development section.
Click to expand...
Click to collapse
+1
Just mailed to ubuntu touch dev team to update touch/devices site.
Sent from my GT-I9100 using xda premium
I added the original entry into the wiki.
I'll change it later on.
Max: can I add you as a contact ?
This is the third thread of Ubuntu Touch for the S2.......
Mine has been out for ages, look in my signature for the link.
Let the grown ups develop son.
You didn't even say what file they must download from the Ubuntu server.........
phablet.zip links
please dont link to the mwc-demo, it is highly outdated, if you use the daily builds and find bugs please report them, we will try to fix them (like we fixed the browser issue over night in the last daily)
ogra-ubuntu said:
please dont link to the mwc-demo, it is highly outdated, if you use the daily builds and find bugs please report them, we will try to fix them (like we fixed the browser issue over night in the last daily)
Click to expand...
Click to collapse
Removed in my post.
Sent from my GT-I9100 using xda premium
Bubble-be said:
I added the original entry into the wiki.
I'll change it later on.
Max: can I add you as a contact ?
Click to expand...
Click to collapse
Yes, you can.
ogra-ubuntu said:
please dont link to the mwc-demo, it is highly outdated, if you use the daily builds and find bugs please report them, we will try to fix them (like we fixed the browser issue over night in the last daily)
Click to expand...
Click to collapse
Ok, I will remove the link in the first post!
Hey max if u want u can add my screenshots ... i don't even need credit for that u are free to use them...
and thnx for the great work...:highfive::good:
I will add a video asap... i was recording a video but sadly my camera was not focusing so i decided to upload jst snapshot...

[GUIDE][GB]How to place a custom icon on the title bar of a certain app

Hey guys!
After some of @SpaceCaker 's modifications, we found out how to place a custom icon on the title bar of any app. Its not a style method but a whole new different method which is much workingproof. You can use your app's icon for reference. So, one of the synonyms that could be said for this guide is JellyBean Title Bar. The modification is very easy though, but the hard part is whether you find the right file which controls the title bar on a specified window. But, I can help you in this.
After following the guide, if you didn't understand it properly, just give me the app and I will place the custom JB title bar on it as per your request.
Requirments :
- Basic XML knowledge
- APK Multi TOOL/Whichever decompiling tool
- Sources on attachments
Click to expand...
Click to collapse
There are 2 different methods to make this.
First method means that the custom windows are located on layouts folder.
Second method means that the windows are located on XML folder.
The first method is very good and is bugfree, but unfortunately it depends on the app. If whether he has the windows located
on layouts folder or XML folder
The second method is not fully bugfree. If the app's windows are located on XML folder then the title bar is going to be scrolled with the chooserboxes too. The only way to fix it is to create a layout for the window.
Click to expand...
Click to collapse
Screenshots of both methods:
One of HelpCentre (1st method) example given below and the second of DSP manager (2nd method).
{
"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"
}
Click to expand...
Click to collapse
1. Decompile the app you want to place the custom title bar. I will take a custom built app "HelpCentre.apk"
2. Download the sources on the attachments and place the layout "title" on the layout folder
and the custom id on ids.xml file on values folder.
Code:
<item type="id" name="imageView1">false</item>
Click to expand...
Click to collapse
3.
a) In the first method the windows are located on the layouts. So see the following :
Go to layouts folder and now find the layout which is responsible for the first window
Let's use an example :
I have credits.xml file on the layout folder. Now on this window, i want to place a custom title bar.
To do this i should include the custom title on layout folder on the first lines.
To make this, paste this code after xmlns:android="http://schemas.android.com/apk/res/android">
Code:
<include android:layout_width="fill_parent" android:layout_height="50.0dip" layout="@layout/title" />
Be sure to place it on the correct order.
I also, have FAQ.xml too. If i want edit this file too, there will be no title bar as on the end of the guide we will add
NoTitleBar theme on AndroidManifest.xml So, therefore i have to place the same value on it too.
Again, after the code xmlns:android="http://schemas.android.com/apk/res/android"> place this one :
Code:
<include android:layout_width="fill_parent" android:layout_height="50.0dip" layout="@layout/title" />
What if you want to use a custom title for the another window?
Easy, we are going to create another exact file as title.xml just that we will rename it different, like titleFAQ.xml.
On this XML we will change the android:icon value. We can use whatever value for the icon. For example,
"@drawable/ic_credits" Then, we will paste the png you want to place on the drawable-ldpi.
Now in the FAQ.xml file you want to place another icon title we should change the layout target so according to what I did so far on the file, this is the target i should place.
Code:
<include android:layout_width="fill_parent" android:layout_height="50.0dip" layout="@layout/titleFAQ" />
Click to expand...
Click to collapse
b) In the second method the windows are located on the XML folder. So follow below :
Go to XML folder and now find the XML which is responsible for the window.
So I will use the same example.
So let's say that the Credits.xml is on the XML folder. Now instead of including <include android:layout_width="fill_parent"......
you should include this code below xmlns:android="http://schemas.android.com/apk/res/android">
Code:
<CheckBoxPreference android:layout="@layout/title" android:title="Help Centre" android:key="Help_title_Centre" />
Android:title is the name of the title bar. You can set it to whatever name you want. Same goes with android:key.
To use another icon for the another title bar which is located on FAQ.xml like i mentioned before, change
Code:
<CheckBoxPreference android:layout="@layout/titleFAQ" android:title="Help Centre" android:key="Help_title_Centre" />
Click to expand...
Click to collapse
4. Now the final step is to go to AndroidManifest.xml and after the specified activity place the NoTitleBar theme
I edited Credits.xml and FAQ.xml so let's find their activity in there.
Code:
<activity android:name="Credits">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
<activity android:name="FAQ">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
I now will add the theme value on both activities. This is the code
Code:
android:theme="@*android:style/Theme.Black.NoTitleBar"
After all it will look like this
Code:
<activity android:theme="@*android:style/Theme.Black.NoTitleBar" android:name="Credits">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
<activity android:theme="@*android:style/Theme.Black.NoTitleBar" android:name="FAQ">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
Now we're done working.
5. Recompile the apk
6. Sign it (Always sign if you edit AndroidManifest.xml)
Click to expand...
Click to collapse
Credits :
Full credits goes to the most amazing themer I have ever seen, @SpaceCaker!
He made many works for Touchwiz Resurrection ROM and I have based the guide upon that modifications just that I have edited
the code and fully explained it.
Also, Touchwiz Resurrection Team members @Vishnu pv and @radichification for their support!
Click to expand...
Click to collapse
Enjoy!
Regards,
Teddy
B]If you want to change the background target you should change something on title.xml or any other title xml you have created for your window.[/B]
Find :
Code:
<LinearLayout android:gravity="center_vertical"
Change :
Code:
android:background="@drawable/title_background"
to a different png target like :
Code:
android:background="@drawable/ics_title_background"
or :
Code:
android:background="@drawable/touchwiz_title_background"
And put the png on drawable-ldpi.
Also, I have included a normal icon for the title bar, but you can change it anytime, just replace it with another icon.
If you want to change the target of the icon find :
Code:
<ImageView android:id="@id/imageView1"
Change :
Code:
android:background="@drawable/title_icon"
To :
Code:
android:background="@drawable/ics_title_icon"
Or :
Code:
android:background="@drawable/touchwiz_title_icon"
And then like I mentioned before put the png on drawable-ldpi
I don't exactly know the title bar's size on LDPI but i think 50.0dip is alright. If someone tries it and the title bar is overlapped just reduce its size on the layout or XML on xml folder that you have edited.
Currently on the zip source I have included a Touchwiz title background as that's what I have atm, but you can get another one ICS or JB themed. I will provide them later. As per now, only touchwiz title background is available.
Download ZIP on attachments.
Don't forget to put correct credits if you are going to include this into your ROM/MOD/Theme.
Great Job Bro. Awesome Guide
Reserved. Awesome guide. Nice
Sent from my GT-S5360 using xda app-developers app
Very nice guide. Expecting more from you..
Sent from my GT-S5360 using Tapatalk 2
Wow! Very nice guide... Btw you have stated that "Download ZIP on attachments" but i dont find any zip attached here.
MuSaddiq said:
Wow! Very nice guide... Btw you have stated that "Download ZIP on attachments" but i dont find any zip attached here.
Click to expand...
Click to collapse
Whut?
I thought I uploaded xD
Or maybe it just is unavailable on tapatalk to be downloaded. Let me check it.
EDIT : Oh damn.. Internet had might been the problem. Wait will add the source as soon as possible. Sorry for the inconvience"
EDIT 2 : Added attachments. Sorry for inconvience again!
Sent from my GT-S5830i using Tapatalk 2
Good good good !!!
Sent from my GT-S5830i using Tapatalk 2
Hello!
Thank you for this guide. I was looking exactly for something like this because I've added a title_bar, on framework-res.apk, with the "Settings.apk" icon that, not only, added the title bar on Settings.apk but other apps receive the same title bar icon as well, which is lame.
And so, I've decided to follow your guide, not to change the title bar on every app that received the same title bar, because of the cahnges I've made on on framework, but simply to change it on Settings.apk, because that was my primary goal since the beginning.
All windows xml files are on xml folder. So I had to go with second method. Faced the expected bug (title bar scrolls with the window).
Sniper Killer said:
The second method is not fully bugfree. If the app's windows are located on XML folder then the title bar is going to be scrolled with the chooserboxes too. The only way to fix it is to create a layout for the window.
Click to expand...
Click to collapse
Err...could you be more specific? I'm sorry but I didn't quite understand how to fix it.
Can you help me?
Thank you!
Typhus_ said:
Hello!
Thank you for this guide. I was looking exactly for something like this because I've added a title_bar, on framework-res.apk, with the "Settings.apk" icon that, not only, added the title bar on Settings.apk but other apps receive the same title bar icon as well, which is lame.
And so, I've decided to follow your guide, not to change the title bar on every app that received the same title bar, because of the cahnges I've made on on framework, but simply to change it on Settings.apk, because that was my primary goal since the beginning.
All windows xml files are on xml folder. So I had to go with second method. Faced the expected bug (title bar scrolls with the window).
Err...could you be more specific? I'm sorry but I didn't quite understand how to fix it.
Can you help me?
Thank you!
Click to expand...
Click to collapse
Actually, creating a new layout for a random window tab requires creating new smalis something not easy to do. You could try to do some experiments and tests and follow any possible guide for it. I cannot help at the moment as I have really been busy with school and my personal stuff. Sorry! :/
OK Sniper.
Thanks anyway.
I'll try to figure it out.
How to place the icon on all apps ?
GSculerlor said:
How to place the icon on all apps ?
Click to expand...
Click to collapse
You should replace the icon with activity_title_bar.9.png on framework-res.apk/res/drawable-xdpi/. The png which you are going to replace must be a 9 patch png and also must be renamed to "activity_title_bar".
Sniper Killer said:
You should replace the icon with activity_title_bar.9.png on framework-res.apk/res/drawable-xdpi/. The png which you are going to replace must be a 9 patch png and also must be renamed to "activity_title_bar".
Click to expand...
Click to collapse
In our case its deawable-ldpi or mdpi in most of the roms instead of xdpi.:thumbup::thumbup::thumbup:
Sent from my GT-S5360 using Tapatalk 2
san122 said:
In our case its deawable-ldpi or mdpi in most of the roms instead of xdpi.:thumbup::thumbup::thumbup:
Sent from my GT-S5360 using Tapatalk 2
Click to expand...
Click to collapse
I wrote xdpi so it could be every density. X -> l, m, h.
Sent from my GT-S5830i using Tapatalk 2
Sniper Killer said:
I wrote xdpi so it could be every density. X -> l, m, h.
Sent from my GT-S5830i using Tapatalk 2
Click to expand...
Click to collapse
Oh sorry i took it as xhdpi
Sent from my GT-S5360 using Tapatalk 2
actually it doesnt really matter if u place pngs in xhdpi or hdpi.
only they need the proper size ofhdpi
this way we can also use a lot of xhdpi pngs on our little devices without resizing
why?
android very clever
they have their own resizing already inside only png needs proper size for its dpi.
Sent from my S500 using xda app-developers app
How to resize title bar ?
Sent from my GT-S5360 using xda app-developers app
GSculerlor said:
How to resize title bar ?
Sent from my GT-S5360 using xda app-developers app
Click to expand...
Click to collapse
If you placed rhis title bar only in settings then you need to add attribute windowtitlesize in your style.
If you did this via framework then open res/values/styles.xml abd search windowtitlesize and increase its value.
50.0 dip will look good for your titlebar.
Sent from my GT-S5360 using Tapatalk 2

SEMI-PURE AOSP ROM - 5.1 LMY47I (06.04.2015)

PURE AOSP ROM FOR NEXUS 5​
{
"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"
}
This is pure AOSP rom for Nexus 5 build straight from google source(latest revision 5.1.0_r1)
Removed some stuff(live wallpapers)
This project is in learning mode,which means i will try to explain all stuff i do with rom,
including building,modifying,github stuff,etc.
ROM DOWNLOAD:
06.04.2015
Latest source built 5.1
Stock kernel included.
AOSP bootanimation included(credits to guerreromanuel).
Banks gapps minimal included (credits to euroskank).
Unique set of ringtones played on Ibanez RG 350DX.
Rom flash takes 5 min to flash.DO NOT PANIC!!!!
Rom is named aosp SEMIPURE 20150406 .zip.
ROM Download on GDrive
ROM Download in DEVDB
INSTALL INSTRUCTIONS:
1.Download rom
2.Download Supersu(in same folder)
3.Reboot in recovery
4.Full wipe
5.Install rom and supersu.
7.Reboot
Thanks and credits:
Google for source
chainfire for supersu
guerreromanuel for bootanimation.
euroskank for gapps.
​
Random videofrom my YOUTUBE channel​
XDA:DevDB Information
SEMI-PURE AOSP ROM - 5.1 LMY47I (06.04.), ROM for the Google Nexus 5
Contributors
malcho
ROM OS Version: 5.0.x Lollipop
ROM Kernel: Linux 3.4.x
Version Information
Status: Alpha
Created 2014-12-26
Last Updated 2015-04-07
GUIDE 1
Initiate build enviroment and download source.​
This link contains all that is needed to initialize source build on ubuntu.I suggest use LTS(long term support) versions of ubuntu.
https://source.android.com/source/initializing.html
Here is the link where you can find how to download source and initialize repo.
https://source.android.com/source/downloading.html
Pay attention on how to choose the right branch.You can find all info about branches here.
https://source.android.com/source/build-numbers.html
For example if you want to build from the latest brunch choose android-5.0.2_r1.
After this download binaries(drivers)for your device.
You have to download three files.Broadcom,LG and Qualcom.
Copy three files to your build directory.If you create folder /build/aosp copy files to that directory nad extract it.
Run all file with following commands,for example ./extract_broadcom_hammerhead.sh.
Now it's time for building.
. build/envsetup.sh
lunch - Choose the device you want(hammerhead is 14)
make otapackage
GUIDE 2​
Ok let's spice up thing a little bit.
I want to remove and add some stuff to rom.First thing i need to do is to enable Show hidden files and folders in ubuntu.
In your build folde go to folder .repo(this folder is hidden).
In that folder create folder local_manifests.
After that create file roomservice.xml
Here is example of my file:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!--Please do not manually edit this file-->
<manifest>
<remote name="github"
fetch="https://github.com"
/>
<remove-project name="platform/packages/apps/Gallery" />
<remove-project name="platform/packages/apps/Browser" />
<remove-project name="platform/packages/apps/Calendar" />
<remove-project name="platform/packages/apps/Camera2" />
<remove-project name="platform/packages/apps/Gallery2" />
<remove-project name="platform/packages/apps/Music" />
<remove-project name="platform/packages/apps/MusicFX" />
<remove-project name="platform/packages/apps/QuickSearchBox" />
<remove-project name="platform/packages/wallpapers/HoloSpiral" />
<remove-project name="platform/packages/wallpapers/Galaxy4" />
<remove-project name="platform/packages/wallpapers/MagicSmoke" />
<remove-project name="platform/packages/wallpapers/NoiseField" />
<remove-project name="platform/packages/wallpapers/PhaseBeam" />
<remove-project name="platform/packages/apps/VoiceDialer" />
<project path="packages/apps/Camera2" name="CyanogenMod/android_packages_apps_Camera2" remote="github" revision="cm-12.0"/>
<project path="packages/apps/Browser" name="CyanogenMod/android_packages_apps_Browser" remote="github" revision="cm-12.0"/>
<project path="packages/apps/Gallery2" name="CyanogenMod/android_packages_apps_Gallery2" remote="github" revision="cm-12.0"/>
</manifest>
Like this i removed package Camera 2 for example and added Camera2 package from Cyanogenmod github.
Pay attention that i have to add remote github at the start of file and also i have to add revision on end of package.
How to add bootanimation into build.
I downloaded bootanimation.zip file.I create folder in vendor/lge/hammerhead and i named it bootanimation.
I copied zip file there.
Then i go to folder vendor/lge/hammerhead and open file device-partial.mk.
Use right click and open file with gedit.
I add this on end of the file.
Code:
vendor/lge/hammerhead/bootanimation/bootanimation.zip:system/media/bootanimation.zip:lge \
Like this i can have bootanimation directly built in my otapackage.
GUIDE 3​HOW TO ADD LAYERS SUPPORT TO ROM​
Go to this site
http://forum.xda-developers.com/android/apps-games/official-layers-bitsyko-apps-rro-t3012172?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+xda-developers%2FShsH+%28xda-developers%29
First you need to go on second post on this thread and open all links from android-review.googlesource.com
Cherry pick this in your source.
Go to respective folder in this case go to frameworks/base and paste cherry-pick link here.
Next you need to add cherry picks from https://github.com/bgill55.
Go to respective folder for example for this case Exposing hard coded resources for type 2 overlay access [3/6].
This have to go to packages/apps/Contacts
Next add remote like this:
git remote add layers git://github.com/bgill55/platform_packages_apps_Contacts.git where layers is a name of remote branch.
git fetch layers
git cherry pick number of commit which you can find bellow
Exposing hard coded resources for type 2 overlay access [3/6]
Have to expose hard coded hex coding to changeable resources for theming purposes. For the Layers type 2 overlays
frankie-mr-1 (#1)
commit 888a7be7ec16960cb80fd8371ff694b9dacb9002 1 parent 5402f10
bgill55 bgill55 authored 23 days ago
Repeat these steps for every project.
More info in OP in next few days.
Don't have so much time.
You should put that this is a ROM and not a question in the subject line. Thank you though!
Sent from my Nexus 5 using XDA Free mobile app
Thanks
Great to see you over here, Malcho! I have your rom for Galaxy S i9000 in pretty good memory. Looking forward to this project!
derboedi said:
Great to see you over here, Malcho! I have your rom for Galaxy S i9000 in pretty good memory. Looking forward to this project!
Click to expand...
Click to collapse
Thanks man.
I will do my best.
Sent from my AOSP on HammerHead using XDA Free mobile app
If pure and straight from google[emoji25] why you add cm camera and gallary. Keep it pure [emoji19]
[emoji51] wait for info
7sen said:
If pure and straight from google[emoji25] why you add cm camera and gallary. Keep it pure [emoji19]
[emoji51] wait for info
Click to expand...
Click to collapse
I had to add some things i like
Sent from my AOSP on HammerHead using XDA Free mobile app
very good project, I would like to learn as you go changing the rom, so you'll have my full attention, some tutorial you refer me which programs I need, thanks in advance.
New AOSP rom is out.
First PrimaL is out.
First guide on second post.
Enjoy
thanks a lot, i like the pure aosp rom
@malcho.Welcome, I remember the time of i9000.long time.Good work.
V3 is up.
Added bootanimation and calendar removed.
Use slimroms gapps.
Happy new year
Sent from my AOSP on HammerHead using XDA Free mobile app
malcho said:
New AOSP rom is out.
First PrimaL is out.
First guide on second post.
Enjoy
Click to expand...
Click to collapse
Thanks dude
Is the memory leak fixed in this rom because i want a clean aosp ROM with that bug fixed.
cpvm said:
Is the memory leak fixed in this rom because i want a clean aosp ROM with that bug fixed.
Click to expand...
Click to collapse
I'm running it for few days haven't notice any problems.
Try it and tell us how it goes
Sent from my AOSP on HammerHead using XDA Free mobile app
The memory leak seems to be fixed but power saving location doesn't work otherwise great work, thank you.
cpvm said:
The memory leak seems to be fixed but power saving location doesn't work otherwise great work, thank you.
Click to expand...
Click to collapse
Try to use gps status for playstore to pull gps locations and then see if it works.
Sent from my Nexus 5 using XDA Free mobile app
New version is up!

Categories

Resources