Hook Layout - Xposed Framework Development

Hi.
I've a layout with code like:
Code:
<com.app.ConversationContentLayout android:id="@id/conversation_layout" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
// FIRST CASE:
<LinearLayout android:orientation="horizontal" android:id="@id/input_layout_content" SOME OTHER CODE >
<ImageButton android:layout_gravity="bottom" android:id="@id/1" android:layout_width="48.0dip" SOME OTHER CODE/>
</LinearLayout>
//SECOND CASE:
<ImageButton android:layout_gravity="bottom|center|right" android:id="@id/2" SOME OTHER CODE/>
</com.app.ConversationContentLayout>
So, i can hook layout if first case, but i can't modify in second case. Code:
Code:
ImageButton first = (ImageButton) liparam.view.findViewById(
liparam.res.getIdentifier("1", "id", "com.app"));
LinearLayout.LayoutParams linearLayoutParams = new LinearLayout.LayoutParams(0, 0);
first.setLayoutParams(linearLayoutParams);
ImageButton second = (ImageButton) liparam.view.findViewById(
liparam.res.getIdentifier("2", "id", "com.app"));
LayoutParams frameLayoutParamSs = new LayoutParams(0, 0);
second.setLayoutParams(frameLayoutParamSs);
Problem is that is first case i can use 'LinearLayout.LayoutParams', but in second case i can't. What should i use? Simply using LayoutParams it crash, using RelativeLayout.LayoutParams does nothing, if i'm hooking the right thing.
Thanks
Edit: I solve in other way, but i didn't know how to solve that specific problem

Related

[Q] How to edit the Quick_settings menu of stock rom 2.3.3 for Desire Z

Hi,
I found that the items of "auto rotation" and "auto brightness" were already compiled judging from the Quick_settings.xml in SystemUI.apk:
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: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:background="#ffffffff" 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">
[B]<include android:id="@id/rotation" layout="@layout/status_bar_preference" />
<include android:id="@id/brightness" layout="@layout/status_bar_preference" />[/B]
<include android:id="@id/wifi" layout="@layout/status_bar_preference" />
<include android:id="@id/bluetooth" layout="@layout/status_bar_preference" />
<include android:id="@id/hotspot" layout="@layout/status_bar_preference" />
<include android:id="@id/gps" layout="@layout/status_bar_preference" />
<include android:id="@id/network" layout="@layout/status_bar_preference" />
<include android:id="@id/settings" layout="@layout/status_bar_preference" />
</LinearLayout>
</ScrollView>
</com.android.systemui.statusbar.preference.QuickSettings>
but these two items are not shown in the quick settings menu.
and I saw them in quicksettings.smali too:
Code:
.class public Lcom/android/systemui/statusbar/preference/QuickSettings;
.super Landroid/widget/LinearLayout;
.source "QuickSettings.java"
# static fields
[B].field private static final BRIGHTNESS:I = 0x4[/B]
.field private static final BT:I = 0x2
.field private static final GPS:I = 0x7
.field private static final HOTSPOT:I = 0x5
.field private static final ITEM_NUMBER:I = 0x8
.field private static final MOBILE_NETWORK:I = 0x3
[B]
.field private static final ROTATION:I = 0x0[/B]
.field private static final SETTINGS:I = 0x6
.field private static final WIFI:I = 0x1
I prefer to have "brightness" and "rotation" to "hotspot" and "bluetooth".
What can I do to achieve this?
I found somebody else needing this too, but there was no helpful information yet:
http://forum.xda-developers.com/showthread.php?t=1187663
Could someone help me?
nobody knows how to?

[GUIDE] Learn to edit APKs | *Very* noob-friendly | Ex. mod: remove brightness slider

Hi. I'm pretty fresh to Android, but I've already fallen in love with it. After getting the courage to root, I've found my phone as customizable as I want. If you want to move past requesting developers to edit this or that for you or just want to learn more about editing neat system files, then this guide is for you. I will be providing a thorough rationale for each step; you don't need to read the rationale to make this work, but kittens will die if you don't. And, if you understand how it all works, you'll be able to mod/edit any APK you ever find! Made possible with help from:
David Dee for inspiring me to mod my phone
grgsiocl for the actual mod
Diamondback for his critical and wonderful integrated developing environment, Virtuous Ten Studio (aka VTS)...thus NO APKTOOL COMMAND LINE REQUIRED. YES. BE HAPPY.
efrant for the helpful ADB clarifications
Chainfire for his wonderful and free adbd insecure app
David Dee, Phoneguy589, psenseny: the three people who liked my post when I said I would write a guide about this.
So, want to make this,
{
"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"
}
look like this:
This mod is for US-based Galaxy S3's running 4.1.1. I'm concurrently running this with David Dee's 23 toggle mod, so no problems there. It might work in other phones, too, but I haven't tested them. Of course, everything you do is your own responsibility. I take no ownership of your issues, but I will help if I can!
The overview: If you know how to decompile, save the signature, edit XMLs, and recompile, just follow the instructions in bold red. For the rest of us, we'll be using the user-friendly, fully GUI Virtuous Ten Studio. First, we'll SystemUI.apk. Decompile. Edit XML. Recompile. Push modded SystemUI.apk and finally restart.
Making a Nandroid, setting up adbd insecure for those on stock kernel, and preparing VTS for use!
READ THIS WHOLE TUTORIAL ONCE AND MAKE SURE YOU UNDERSTAND IT BEFORE ACTUALLY STARTING IT. Ask me before you do something you don't know!
Root required. Why: we need to edit files in the /system partition of Android. Only root users will be able to do that.
Make a Nandroid backup right now (either using the wonderful Orange Backup app or reboot to recovery and make it).
I wasn't joking.
Seriously, make a Nandroid backup right now.
If you have the stock kernel (or any kernel that is "secure" [i.e. ro.secure=1 in your build.prop]), then install adbd insecure onto your phone. Why: expediency (i.e. fewer commands to type). VTS will be using ADB, the Android Debugging Bridge, to copy and paste files from our computer to our phone. If you are rooted + stock kernel, ADB runs in a "secure" mode that will make us jump through some hoops to copy files. Your phone has a build.prop file, located in /system. It has a line in there called ro.secure; if it is ro.secure=1, adb will run in this annoying secure mode (EVEN IF YOU ARE ROOTED). Adbd insecure will ignore that ro.secure=1 setting and force adbd to run insecure (get it? adbd insecure is the name of the app? Chainfire, you so clever!)
Now, install Virtuous Ten Studios (VTS) Why: We'll be using VTS exclusively to decompile, edit the XML, and recompile. You will NOT be writing a single line of code into a command prompt or anything. Thank you, modern software.
Read the tutorials gratefully written by Diamondback, et al. They're on the website linked in the link in the step above.
You didn't read them, did you? Jerk. lol, jk. But, seriously, read them. It will make VTS seem not so foreign and scary!
Enable Settings -> USB debugging on your phone.
Run the adbd insecure app on your phone. Check "Enable insecure adbd."
Plug your phone into your computer.
Open VTS. Then "File" -> "Open VTS Settings".
Go to "External Tools" -> "ApkTool". Click "Add single framework". Why: long answer here, haha. APKs are zip files, but if you simply unzipped them and opened an XML file, you'd get garbage. Unreadable junk! That's because the APK has been COMPILED. It was a collection of folders, then it was compiled (which, IMO, just means it was changed into Android-readable-code). We need Windows-readable-code. So, we must decompile the APK. Then we shall see Windows-readable-code organized into neat little folders. But, to change from Android-readable-code to Windows-readable-code, we need some extra files. Namely, your framework-res.apk. It contains some instructions or random junk (no idea what exactly) that will allow us to decompile SystemUI.apk.
Give your framework a tag. It's just a name that you can remember. Framework-res.apks are specific to each phone and each ROM, so if you did LOTS of theming, the tag would be useful in recalling which framework-res.apk this is!
Click OK. Then, click the down arrow next to Remote File. Open the Framework folder and highlight "framework-res.apk." Then click "Import." It'll take 15 or so seconds.
Click OK after the framework installs (you'll see it appear in your window!).
Modifying SystemUI.apk to remove the brightness bar
Let's actually do the mod now, eh? Click File in VTS and click "New Project." Why: Solutions are like "folders" and Projects are like "files" in VTS. It's just to keep you organized. We're going to be editing ONE file, so we'll make ONE solution and inside that solution will be ONE project.
Make sure Apk-Project is highlighted on the "Project" tab. Give the Project and Solution a name; doesn't matter what.
Click Apk-Tool on the left. Inside the framework tag box, type in the name you gave your framework. Or select it from the drop-down menu; whatever works for you.
Click Smali on the left. Choose API Level "4.1 Jelly Bean" Why: we aren't editing Smali (a different kind of code, besides XML), but it can't hurt, right?
Go to Build on the left. Make sure "Sign output file via the following method" is checked and Select "Keep old signature (not recommended)". It's not recommended because sometimes it can cause problems; but, it is the best option for system APKs (not user apks, like Pandora.apk). Why: every app has a signature verifying that it is made by this developer (and not some hacker). Think of a signature as a trip-wire for zipping and compiling APKs. If we do either of those, the signature will go crazy; if you have a "crazy"/tripped signature, your phone will be stuck on the boot logo. So, APKs are basically zip files; the signature is inside both the META-INF folder and AndroidManifest.xml file. Again, these files are tripped/changed if you unzip or re-zip or decompile or re-compile your APK (very sensitive!); you don't even have to open them and they will get changed! Thus, VTS, after we recompile, will insert the original META-INF folder and AndroidManifest.xml file (that it backed up when it pulled the APK) back into the now-modified APK.
Go to Import on the left. Click the "..." button on the right. Click the down arrow next to Remote file. Open the System folder.
BEHOLD the wonderful list of all the system apps installed on your phone. Scrooooooollllll down to SystemUI. apk. Select it and click import.
Click "OK" to begin decompiling SystemUI.apk
Wait about 20 seconds. You should be greeted with a set of folders called assets, res, and smali, as well as AndroidManifest.XML, apktook.yml, and buildevents.
Open res -> layout -> tw_status_bar_expanded.xml by DOUBLE-CLICKING it. WARNING: there are about 50 different folders that are called layout-blah and 50 different XML files that have "tw" and "status_bar" there. Make sure you open the right file.
You should get some nice XML code at the bottom. Add exactly this:
Code:
android:visibility="gone"
here (it's colored in red; scroll right to see it!):
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/notification_panel" android:background="@drawable/back" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="@dimen/notification_panel_margin_left"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
<include android:layout_width="fill_parent" android:layout_height="@dimen/tw_notification_panel_header_height" layout="@layout/tw_status_bar_expanded_header" />
<com.wanam.systemui.quickpanel.PowerWidget android:id="@id/exp_power_stat" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/notification_panel_header_height" />
<HorizontalScrollView android:id="@id/quicksetting_scroller" android:scrollbars="none" android:layout_width="wrap_content" android:layout_height="@dimen/quick_setting_button_height" android:layout_marginTop="@dimen/tw_notification_panel_header_height">
<com.android.systemui.statusbar.policy.quicksetting.QuickSettingPanel android:orientation="horizontal" android:id="@id/quicksetting_container" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:divider="@drawable/tw_black_bg" android:showDividers="middle" />
</HorizontalScrollView>
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginTop="@dimen/notification_panel_quicksettingbtn_height" android:overScrollMode="ifContentScrolls">
<LinearLayout android:orientation="vertical" android:id="@id/scrollCart" android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:orientation="vertical" android:id="@id/brightness_controller" [B][COLOR="Red"]android:visibility="gone"[/COLOR][/B] android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="56.0dip">
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="1.0dip">
<ImageView android:id="@id/brightness_icon" android:clickable="true" android:layout_width="25.0dip" android:layout_height="fill_parent" android:layout_marginLeft="13.0dip" android:src="@drawable/ic_sysbar_brightness" android:contentDescription="@string/accessibility_brightness_icon" />
<FrameLayout android:id="@id/brightness_group" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/auto_brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
</FrameLayout>
</LinearLayout>
<View android:background="#ff091a24" android:layout_width="fill_parent" android:layout_height="1.0dip" />
</LinearLayout>
<LinearLayout android:orientation="vertical" android:id="@id/noNotificationsTitle" android:focusable="true" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textStyle="bold" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/noNotificationsText" android:paddingLeft="11.0dip" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height" android:text="@string/status_bar_no_notifications_title" />
</LinearLayout>
<LinearLayout android:orientation="vertical" android:id="@id/onGoingCart" android:background="#ff293945" android:focusable="true" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height">
<TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textStyle="bold" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/onGoingNotificationText" android:paddingLeft="11.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:text="@string/status_bar_ongoing_events_title" />
</LinearLayout>
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/onGoingItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
<LinearLayout android:orientation="vertical" android:id="@id/notificationCart" android:background="#ff293945" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height">
<RelativeLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textStyle="bold" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/latestNotificationText" android:paddingLeft="11.0dip" android:layout_width="180.0dip" android:layout_height="fill_parent" android:text="@string/status_bar_latest_events_title" android:layout_alignParentLeft="true" />
<TextView android:textSize="@dimen/status_bar_expanded_notification_clear_button_text_size" android:textColor="@color/tw_status_bar_clear_btn_text" android:gravity="center" android:id="@id/clear_all_button" android:background="@drawable/tw_btn_default_small" android:padding="0.100000024dip" android:focusable="true" android:clickable="true" android:layout_width="@dimen/status_bar_expanded_clear_button_width" android:layout_height="fill_parent" android:layout_marginRight="4.0dip" android:text="@string/status_bar_clear_all_button" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
</RelativeLayout>
</LinearLayout>
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/notificationItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
</LinearLayout>
</ScrollView>
</FrameLayout>
<com.android.systemui.statusbar.phone.CloseDragHandle android:layout_gravity="bottom" android:orientation="vertical" android:id="@id/close" android:layout_width="fill_parent" android:layout_height="@dimen/tw_close_handle_height">
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageView android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/tw_close_handle_height" android:src="@drawable/tw_status_bar_close" android:scaleType="fitXY" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network" android:gravity="center" android:layout_gravity="bottom" android:id="@id/carrier_label" android:layout_width="fill_parent" android:layout_height="@dimen/tw_close_handle_height" android:layout_marginBottom="10.0dip" />
</RelativeLayout>
</com.android.systemui.statusbar.phone.CloseDragHandle>
</FrameLayout>
Then, DO NOT TOUCH ANYTHING ELSE in the XML file. Unless you're feeling adventurous?
Click "Push All" on the top. If you did it right, it shall ask you "Do you want to save changes?"
Click yes. Wait 2 minutes while it re-compiles and pushes the APK to /system/app.
If all went well, your screen will flicker and you'll get the original wallpaper back. No worries. REBOOT YOUR PHONE (this will reload SystemUI.apk, disable adbd insecure, and put /system back in a read-only state: all good things!) and ENJOY NO BRIGHTNESS BAR.
Questions?
Re: [GUIDE] *very* noob-friendly - learn to edit APKs - ex.: remove the brightness sl
I actually just posted a question in the TW themeing sticky thread concerning the brightness slider removal. Can you take a look and see if you might be able to help... Don't want to double post.
Thank You.
Sent from my SGS III
Re: [GUIDE] *very* noob-friendly - learn to edit APKs - ex.: remove the brightness sl
Hi! I see! OK. I simply added the android:visibility="gone" instead of changing the dip to 0.0.
To keep a placeholder, add my code just one line below the one I've posted. I don't exactly know how to do it your way.
This will give you a buffer as tall as the original brightness slider, like so:
However, that might be too much of a buffer. Then, I would experiment with some of those dip numbers concerning height and one of them might shrink it for you!
Nice tuto!
Then, DO NOT TOUCH ANYTHING ELSE in the XML file. Unless you're feeling adventurous?
Click to expand...
Click to collapse
Just for information, the layout file can be eaisly edited with Eclipse or Intellij Idea (both are free, Intellij is better BUT not opensource).
Using these tools is interesting as it can generate a view on your computer of the result.
So it is very easy to be adventurous
Regards
---------- Post added at 04:40 PM ---------- Previous post was at 04:33 PM ----------
ikjadoon said:
Hi! I see! OK. I simply added the android:visibility="gone" instead of changing the dip to 0.0.
To keep a placeholder, add my code just one line below the one I've posted. I don't exactly know how to do it your way.
This will give you a buffer as tall as the original brightness slider, like so:
However, that might be too much of a buffer. Then, I would experiment with some of those dip numbers concerning height and one of them might shrink it for you!
Click to expand...
Click to collapse
for the effect of Gone:
http://developer.android.com/reference/android/view/View.html#attr_android:visibility
Thanks. It's nothing big, but I was excited when I finally got it all to work. Oooh, that would be very handy! Hrmm.....I shall contemplate learning those programs---it's like opening Pandora's box, so many things to do!
I see; thank you for linking that wonderful website (no idea it existed!). So, maybe then, swiftks, keep the edit in the same line, but change it to android:visibility="invisible" ?
~Ibrahim~
Thanks guys, got it perfect to my liking. :laugh: :good:
Here's my tw_status_bar_expanded.xml with the changes in RED.
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/notification_panel" android:background="@drawable/notification_panel_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="@dimen/notification_panel_margin_left"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
<include android:layout_width="fill_parent" android:layout_height="@dimen/tw_notification_panel_header_height" layout="@layout/tw_status_bar_expanded_header" />
<com.wanam.systemui.quickpanel.PowerWidget android:id="@id/exp_power_stat" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/notification_panel_header_height" />
<HorizontalScrollView android:id="@id/quicksetting_scroller" android:scrollbars="none" android:layout_width="wrap_content" android:layout_height="@dimen/quick_setting_button_height" android:layout_marginTop="@dimen/tw_notification_panel_header_height">
<com.android.systemui.statusbar.policy.quicksetting.QuickSettingPanel android:orientation="horizontal" android:id="@id/quicksetting_container" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:divider="@drawable/tw_black_bg" android:showDividers="middle" />
</HorizontalScrollView>
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginTop="@dimen/notification_panel_quicksettingbtn_height" android:overScrollMode="ifContentScrolls">
<LinearLayout android:orientation="vertical" android:id="@id/scrollCart" android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:orientation="vertical" android:id="@id/brightness_controller" android:background="#ff000000" [COLOR="red"]android:visibility="invisible"[/COLOR] android:layout_width="fill_parent" android:layout_height="[COLOR="red"]26.0dip[/COLOR]">
<LinearLayout android:orientation="horizontal" [COLOR="red"]android:visibility="invisible"[/COLOR] android:layout_width="fill_parent" android:layout_height="[COLOR="red"]25.0dip[/COLOR]">
<ImageView android:id="@id/brightness_icon" android:clickable="true" android:layout_width="25.0dip" android:layout_height="fill_parent" android:layout_marginLeft="13.0dip" android:src="@drawable/ic_sysbar_brightness" android:contentDescription="@string/accessibility_brightness_icon" />
<FrameLayout android:id="@id/brightness_group" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/auto_brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
</FrameLayout>
</LinearLayout>
<View android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="1.0dip" />
</LinearLayout>
<LinearLayout android:orientation="vertical" android:id="@id/noNotificationsTitle" android:focusable="true" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textStyle="bold" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/noNotificationsText" android:paddingLeft="11.0dip" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height" android:text="@string/status_bar_no_notifications_title" />
</LinearLayout>
<LinearLayout android:orientation="vertical" android:id="@id/onGoingCart" android:background="#ff000000" android:focusable="true" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height">
<TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textStyle="bold" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/onGoingNotificationText" android:paddingLeft="11.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:text="@string/status_bar_ongoing_events_title" />
</LinearLayout>
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/onGoingItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
<LinearLayout android:orientation="vertical" android:id="@id/notificationCart" android:background="#ff000000" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height">
<RelativeLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textStyle="bold" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/latestNotificationText" android:paddingLeft="11.0dip" android:layout_width="180.0dip" android:layout_height="fill_parent" android:text="@string/status_bar_latest_events_title" android:layout_alignParentLeft="true" />
<TextView android:textSize="@dimen/status_bar_expanded_notification_clear_button_text_size" android:textColor="@color/tw_status_bar_clear_btn_text" android:gravity="center" android:id="@id/clear_all_button" android:background="@drawable/tw_btn_default_small" android:padding="0.100000024dip" android:focusable="true" android:clickable="true" android:layout_width="@dimen/status_bar_expanded_clear_button_width" android:layout_height="fill_parent" android:layout_marginRight="4.0dip" android:text="@string/status_bar_clear_all_button" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
</RelativeLayout>
</LinearLayout>
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/notificationItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
</LinearLayout>
</ScrollView>
</FrameLayout>
<com.android.systemui.statusbar.phone.CloseDragHandle android:layout_gravity="bottom" android:orientation="vertical" android:id="@id/close" android:layout_width="fill_parent" android:layout_height="@dimen/tw_close_handle_height">
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageView android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/tw_close_handle_height" android:src="@drawable/tw_status_bar_close" android:scaleType="fitXY" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network" android:gravity="center" android:layout_gravity="bottom" android:id="@id/carrier_label" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_marginBottom="0.0dip" />
</RelativeLayout>
</com.android.systemui.statusbar.phone.CloseDragHandle>
</FrameLayout>
just a tip if you are not on a windows machine because windows blows
use apktool... much much moree effective... in my opinion and to edit smali or xmls i use Sublime text editor
also i belive in this same xml u can remove carrier logo and some more fun stuff ;D as well as mess with color.
Good tut!
I was poking around with vts for systemui then i found your tut. Covered the basic startup. Work on my note 2 and s3.
Just to let you know, vts was updated to keep old signature together with the "AndroidManifest.xml" i just used the keep old signature feature and push it to my phone. Real easy no more typing to push. Thankyou very much!!! Much better than using apktool.
Sorry for bumping old thread but i cant resist haha!
winmobby said:
I was poking around with vts for systemui then i found your tut. Covered the basic startup. Work on my note 2 and s3.
Just to let you know, vts was updated to keep old signature together with the "AndroidManifest.xml" i just used the keep old signature feature and push it to my phone. Real easy no more typing to push. Thankyou very much!!! Much better than using apktool.
Sorry for bumping old thread but i cant resist haha!
Click to expand...
Click to collapse
Oh, it was! I saw that and totally forgot to update the guide. Will do!
Wow, it is so much easier now! Thanks for the heads up.
How to change Carrier ID to Carrier Logo
ikjadoon said:
Hi. I'm pretty fresh to Android, but I've already fallen in love with it. After getting the courage to root, I've found my phone as customizable as I want. If you want to move past requesting developers to edit this or that for you or just want to learn more about editing neat system files, then this guide is for you. I will be providing a thorough rationale for each step; you don't need to read the rationale to make this work, but kittens will die if you don't. And, if you understand how it all works, you'll be able to mod/edit any APK you ever find! Made possible with help from:
David Dee for inspiring me to mod my phone
grgsiocl for the actual mod
Diamondback for his critical and wonderful integrated developing environment, Virtuous Ten Studio (aka VTS)...thus NO APKTOOL COMMAND LINE REQUIRED. YES. BE HAPPY.
efrant for the helpful ADB clarifications
Chainfire for his wonderful and free adbd insecure app
David Dee, Phoneguy589, psenseny: the three people who liked my post when I said I would write a guide about this.
So, want to make this,
look like this:
This mod is for US-based Galaxy S3's running 4.1.1. I'm concurrently running this with David Dee's 23 toggle mod, so no problems there. It might work in other phones, too, but I haven't tested them. Of course, everything you do is your own responsibility. I take no ownership of your issues, but I will help if I can!
The overview: If you know how to decompile, save the signature, edit XMLs, and recompile, just follow the instructions in bold red. For the rest of us, we'll be using the user-friendly, fully GUI Virtuous Ten Studio. First, we'll SystemUI.apk. Decompile. Edit XML. Recompile. Push modded SystemUI.apk and finally restart.
Making a Nandroid, setting up adbd insecure for those on stock kernel, and preparing VTS for use!
READ THIS WHOLE TUTORIAL ONCE AND MAKE SURE YOU UNDERSTAND IT BEFORE ACTUALLY STARTING IT. Ask me before you do something you don't know!
Root required. Why: we need to edit files in the /system partition of Android. Only root users will be able to do that.
Make a Nandroid backup right now (either using the wonderful Orange Backup app or reboot to recovery and make it).
I wasn't joking.
Seriously, make a Nandroid backup right now.
If you have the stock kernel (or any kernel that is "secure" [i.e. ro.secure=1 in your build.prop]), then install adbd insecure onto your phone. Why: expediency (i.e. fewer commands to type). VTS will be using ADB, the Android Debugging Bridge, to copy and paste files from our computer to our phone. If you are rooted + stock kernel, ADB runs in a "secure" mode that will make us jump through some hoops to copy files. Your phone has a build.prop file, located in /system. It has a line in there called ro.secure; if it is ro.secure=1, adb will run in this annoying secure mode (EVEN IF YOU ARE ROOTED). Adbd insecure will ignore that ro.secure=1 setting and force adbd to run insecure (get it? adbd insecure is the name of the app? Chainfire, you so clever!)
Now, install Virtuous Ten Studios (VTS) Why: We'll be using VTS exclusively to decompile, edit the XML, and recompile. You will NOT be writing a single line of code into a command prompt or anything. Thank you, modern software.
Read the tutorials gratefully written by Diamondback, et al. They're on the website linked in the link in the step above.
You didn't read them, did you? Jerk. lol, jk. But, seriously, read them. It will make VTS seem not so foreign and scary!
Enable Settings -> USB debugging on your phone.
Run the adbd insecure app on your phone. Check "Enable insecure adbd."
Plug your phone into your computer.
Open VTS. Then "File" -> "Open VTS Settings".
Go to "External Tools" -> "ApkTool". Click "Add single framework". Why: long answer here, haha. APKs are zip files, but if you simply unzipped them and opened an XML file, you'd get garbage. Unreadable junk! That's because the APK has been COMPILED. It was a collection of folders, then it was compiled (which, IMO, just means it was changed into Android-readable-code). We need Windows-readable-code. So, we must decompile the APK. Then we shall see Windows-readable-code organized into neat little folders. But, to change from Android-readable-code to Windows-readable-code, we need some extra files. Namely, your framework-res.apk. It contains some instructions or random junk (no idea what exactly) that will allow us to decompile SystemUI.apk.
Give your framework a tag. It's just a name that you can remember. Framework-res.apks are specific to each phone and each ROM, so if you did LOTS of theming, the tag would be useful in recalling which framework-res.apk this is!
Click OK. Then, click the down arrow next to Remote File. Open the Framework folder and highlight "framework-res.apk." Then click "Import." It'll take 15 or so seconds.
Click OK after the framework installs (you'll see it appear in your window!).
Modifying SystemUI.apk to remove the brightness bar
Let's actually do the mod now, eh? Click File in VTS and click "New Project." Why: Solutions are like "folders" and Projects are like "files" in VTS. It's just to keep you organized. We're going to be editing ONE file, so we'll make ONE solution and inside that solution will be ONE project.
Make sure Apk-Project is highlighted on the "Project" tab. Give the Project and Solution a name; doesn't matter what.
Click Apk-Tool on the left. Inside the framework tag box, type in the name you gave your framework. Or select it from the drop-down menu; whatever works for you.
Click Smali on the left. Choose API Level "4.1 Jelly Bean" Why: we aren't editing Smali (a different kind of code, besides XML), but it can't hurt, right?
Go to Build on the left. Make sure "Sign output file via the following method" is checked and Select "Keep old signature (not recommended)". It's not recommended because sometimes it can cause problems; but, it is the best option for system APKs (not user apks, like Pandora.apk). Why: every app has a signature verifying that it is made by this developer (and not some hacker). Think of a signature as a trip-wire for zipping and compiling APKs. If we do either of those, the signature will go crazy; if you have a "crazy"/tripped signature, your phone will be stuck on the boot logo. So, APKs are basically zip files; the signature is inside both the META-INF folder and AndroidManifest.xml file. Again, these files are tripped/changed if you unzip or re-zip or decompile or re-compile your APK (very sensitive!); you don't even have to open them and they will get changed! Thus, VTS, after we recompile, will insert the original META-INF folder and AndroidManifest.xml file (that it backed up when it pulled the APK) back into the now-modified APK.
Go to Import on the left. Click the "..." button on the right. Click the down arrow next to Remote file. Open the System folder.
BEHOLD the wonderful list of all the system apps installed on your phone. Scrooooooollllll down to SystemUI. apk. Select it and click import.
Click "OK" to begin decompiling SystemUI.apk
Wait about 20 seconds. You should be greeted with a set of folders called assets, res, and smali, as well as AndroidManifest.XML, apktook.yml, and buildevents.
Open res -> layout -> tw_status_bar_expanded.xml by DOUBLE-CLICKING it. WARNING: there are about 50 different folders that are called layout-blah and 50 different XML files that have "tw" and "status_bar" there. Make sure you open the right file.
You should get some nice XML code at the bottom. Add exactly this:
Code:
android:visibility="gone"
here (it's colored in red; scroll right to see it!):
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/notification_panel" android:background="@drawable/back" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="@dimen/notification_panel_margin_left"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
<include android:layout_width="fill_parent" android:layout_height="@dimen/tw_notification_panel_header_height" layout="@layout/tw_status_bar_expanded_header" />
<com.wanam.systemui.quickpanel.PowerWidget android:id="@id/exp_power_stat" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/notification_panel_header_height" />
<HorizontalScrollView android:id="@id/quicksetting_scroller" android:scrollbars="none" android:layout_width="wrap_content" android:layout_height="@dimen/quick_setting_button_height" android:layout_marginTop="@dimen/tw_notification_panel_header_height">
<com.android.systemui.statusbar.policy.quicksetting.QuickSettingPanel android:orientation="horizontal" android:id="@id/quicksetting_container" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:divider="@drawable/tw_black_bg" android:showDividers="middle" />
</HorizontalScrollView>
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginTop="@dimen/notification_panel_quicksettingbtn_height" android:overScrollMode="ifContentScrolls">
<LinearLayout android:orientation="vertical" android:id="@id/scrollCart" android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:orientation="vertical" android:id="@id/brightness_controller" [B][COLOR="Red"]android:visibility="gone"[/COLOR][/B] android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="56.0dip">
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="1.0dip">
<ImageView android:id="@id/brightness_icon" android:clickable="true" android:layout_width="25.0dip" android:layout_height="fill_parent" android:layout_marginLeft="13.0dip" android:src="@drawable/ic_sysbar_brightness" android:contentDescription="@string/accessibility_brightness_icon" />
<FrameLayout android:id="@id/brightness_group" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/auto_brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
</FrameLayout>
</LinearLayout>
<View android:background="#ff091a24" android:layout_width="fill_parent" android:layout_height="1.0dip" />
</LinearLayout>
<LinearLayout android:orientation="vertical" android:id="@id/noNotificationsTitle" android:focusable="true" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textStyle="bold" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/noNotificationsText" android:paddingLeft="11.0dip" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height" android:text="@string/status_bar_no_notifications_title" />
</LinearLayout>
<LinearLayout android:orientation="vertical" android:id="@id/onGoingCart" android:background="#ff293945" android:focusable="true" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height">
<TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textStyle="bold" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/onGoingNotificationText" android:paddingLeft="11.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:text="@string/status_bar_ongoing_events_title" />
</LinearLayout>
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/onGoingItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
<LinearLayout android:orientation="vertical" android:id="@id/notificationCart" android:background="#ff293945" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height">
<RelativeLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textStyle="bold" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/latestNotificationText" android:paddingLeft="11.0dip" android:layout_width="180.0dip" android:layout_height="fill_parent" android:text="@string/status_bar_latest_events_title" android:layout_alignParentLeft="true" />
<TextView android:textSize="@dimen/status_bar_expanded_notification_clear_button_text_size" android:textColor="@color/tw_status_bar_clear_btn_text" android:gravity="center" android:id="@id/clear_all_button" android:background="@drawable/tw_btn_default_small" android:padding="0.100000024dip" android:focusable="true" android:clickable="true" android:layout_width="@dimen/status_bar_expanded_clear_button_width" android:layout_height="fill_parent" android:layout_marginRight="4.0dip" android:text="@string/status_bar_clear_all_button" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
</RelativeLayout>
</LinearLayout>
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/notificationItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
</LinearLayout>
</ScrollView>
</FrameLayout>
<com.android.systemui.statusbar.phone.CloseDragHandle android:layout_gravity="bottom" android:orientation="vertical" android:id="@id/close" android:layout_width="fill_parent" android:layout_height="@dimen/tw_close_handle_height">
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageView android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/tw_close_handle_height" android:src="@drawable/tw_status_bar_close" android:scaleType="fitXY" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network" android:gravity="center" android:layout_gravity="bottom" android:id="@id/carrier_label" android:layout_width="fill_parent" android:layout_height="@dimen/tw_close_handle_height" android:layout_marginBottom="10.0dip" />
</RelativeLayout>
</com.android.systemui.statusbar.phone.CloseDragHandle>
</FrameLayout>
Then, DO NOT TOUCH ANYTHING ELSE in the XML file. Unless you're feeling adventurous?
Click "Push All" on the top. If you did it right, it shall ask you "Do you want to save changes?"
Click yes. Wait 2 minutes while it re-compiles and pushes the APK to /system/app.
If all went well, your screen will flicker and you'll get the original wallpaper back. No worries. REBOOT YOUR PHONE (this will reload SystemUI.apk, disable adbd insecure, and put /system back in a read-only state: all good things!) and ENJOY NO BRIGHTNESS BAR.
Questions?
Click to expand...
Click to collapse
Plez guilde me how to change Carrier ID to Carrier Logo (*.png) into notif bar
i used galaxy s3 AT&T i747 rom Stock JB 4.1.1
Ái Nhân said:
Plez guilde me how to change Carrier ID to Carrier Logo (*.png) into notif bar
i used galaxy s3 AT&T i747 rom Stock JB 4.1.1
Click to expand...
Click to collapse
Hi! Unforunately, I don't know how to do that particular mod. This guide is more to help you decompile/recompile than provide exact instructions for all the other mods.
If you've seen that mod in a ROM, contact the developer! They're pretty friendly folk.
Ái Nhân said:
Plez guilde me how to change Carrier ID to Carrier Logo (*.png) into notif bar
i used galaxy s3 AT&T i747 rom Stock JB 4.1.1
Click to expand...
Click to collapse
Sorry I missed this! This tweak should work:
http://forum.xda-developers.com/showthread.php?t=2227624
~Ibrahim~
EDIT: Ah, this thread has a second page. Haha, I had a little more time to search!

[Help] Change the width of the Notification panel date

As there is a clock on the statusbar and the homescreen, i dont see the need for one on the notification panel status bar as well.
I have managed to remove the notification panel clock
and change the notification panel date to a single line.
I am wanting to increase the width of the notification panel date.
after which i will increase the text size.
However i cannot find which xml file controls the width of the date.
as you can see by my screenshot the single line date is still the original width, only showing part of the date
Does anybody know the name and location of the xml file which controls the width of the notification panel date?
Any help would be greatly apreciated
Tired Storeman said:
As there is a clock on the statusbar and the homescreen, i dont see the need for one on the notification panel status bar as well.
I have managed to remove the notification panel clock
and change the notification panel date to a single line.
I am wanting to increase the width of the notification panel date.
after which i will increase the text size.
However i cannot find which xml file controls the width of the date.
as you can see by my screenshot the single line date is still the original width, only showing part of the date
Does anybody know the name and location of the xml file which controls the width of the notification panel date?
Any help would be greatly apreciated
Click to expand...
Click to collapse
hello mate.
I think u should open tw_status_bar_expanded.xml and look for the blue higlighted line below:
Code:
<com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date" android:textColor="#ffcbcbcb" android:ellipsize="none" android:id="@id/date" [COLOR="Blue"]android:layout_width="wrap_content"[/COLOR] android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:layout_marginRight="4.0dip" android:maxLines="2" />
never try editing this before, but u could try changing the width to something like android:layout_width="48.0dip" try changing the numbers to fit the size.
Cheers..
maanz said:
hello mate.
I think u should open tw_status_bar_expanded.xml and look for the blue higlighted line below:
Code:
<com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date" android:textColor="#ffcbcbcb" android:ellipsize="none" android:id="@id/date" [COLOR="Blue"]android:layout_width="wrap_content"[/COLOR] android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:layout_marginRight="4.0dip" android:maxLines="2" />
never try editing this before, but u could try changing the width to something like android:layout_width="48.0dip" try changing the numbers to fit the size.
Cheers..
Click to expand...
Click to collapse
Hey maanz thanks for the suggestion,
I neglected to mention in my original post that i was on an AOSP theme
i tried your suggestion on status_bar_expanded.xml
this is what i tried
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:background="#00000000" android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="false"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<ImageView android:id="@id/settings_button" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/ic_notify_quicksettings" android:scaleType="center" android:contentDescription="@string/accessibility_settings_button" />
<com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date" android:id="@id/date" [COLOR="Red"]android:layout_width="150.0dip"[/COLOR] android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:layout_marginRight="8.0dip" android:singleLine="true" />
<com.android.systemui.statusbar.RotationToggle android:id="@id/rotation_lock_button" android:clickable="true" android:layout_width="32.0dip" android:layout_height="32.0dip" android:layout_margin="8.0dip" android:button="@drawable/ic_notify_rotation" android:contentDescription="@string/accessibility_rotation_lock_off" />
<Space android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_weight="1.0" />
<ImageView android:id="@id/clear_all_button" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/ic_notify_clear" android:scaleType="center" android:contentDescription="@string/accessibility_clear_all" />
</LinearLayout>
but unfortunatly it didnt make any difference
Appreciate you trying to help all the same
Tired Storeman said:
Hey maanz thanks for the suggestion,
I neglected to mention in my original post that i was on an AOSP theme
i tried your suggestion on status_bar_expanded.xml
this is what i tried
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:background="#00000000" android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="false"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<ImageView android:id="@id/settings_button" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/ic_notify_quicksettings" android:scaleType="center" android:contentDescription="@string/accessibility_settings_button" />
<com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date" android:id="@id/date" [COLOR="Red"]android:layout_width="150.0dip"[/COLOR] android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:layout_marginRight="8.0dip" android:singleLine="true" />
<com.android.systemui.statusbar.RotationToggle android:id="@id/rotation_lock_button" android:clickable="true" android:layout_width="32.0dip" android:layout_height="32.0dip" android:layout_margin="8.0dip" android:button="@drawable/ic_notify_rotation" android:contentDescription="@string/accessibility_rotation_lock_off" />
<Space android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_weight="1.0" />
<ImageView android:id="@id/clear_all_button" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/ic_notify_clear" android:scaleType="center" android:contentDescription="@string/accessibility_clear_all" />
</LinearLayout>
but unfortunatly it didnt make any difference
Appreciate you trying to help all the same
Click to expand...
Click to collapse
I think u should look at tw_status_bar_expanded.xml, not status_bar_expanded.xml.

(SOLVED) Single line notification date.

I would like to ask if any body knows how to change the date on the notification screen to a single line, rather than 2 lines.
I have a SGS2 with Neat Rom Lite v4.8 XWLSW
What i have done so far
1. Removed clock
2. Moved the settings button to the left of the screen
3. Tried changing <com.android.systemui.statusbar.policy.DateView........ to android:maxLines="1"
Which changes the date to a single line, but only 1 word of the date is shown (see screenshot)
4. Tried changing <com.android.systemui.statusbar.policy.DateView.......android:layout_width="wrap_content" to "150.0dip" to try and make the date container large, (no change)
5. Changed <com.android.systemui.statusbar.policy.DateView.......android:layout_height="wrap_content" to the "39.0dip" the same height as the notification header (no change)
I am thinking that i need to change something in DateView smali, but unfortunatly i do not know smali, and would not know which line to edit.
If anybody could offer any assistance, it would be greatly appreciated.
This is my tw_status_bar_expanded_header.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="39.0dip" android:baselineAligned="false"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<RelativeLayout android:id="@id/settings_button" android:background="@drawable/tw_quick_panel_setting_button_bg" android:focusable="true" android:visibility="visible" android:layout_width="@dimen/status_bar_expanded_setting_width" android:layout_height="39.0dip">
<ImageView android:id="@id/settings_button_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/tw_quickpanel_icon_settings" android:scaleType="center" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:contentDescription="@string/accessibility_settings_button" />
</RelativeLayout>
<ImageView android:layout_width="1.0dip" android:layout_height="25.0dip" android:layout_marginTop="7.0dip" android:layout_marginBottom="7.0dip" android:src="@drawable/tw_quick_panel_plnm_setting_dv" />
<com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date" android:textSize="18.0dip" android:textColor="#ffffffff" android:ellipsize="none" android:id="@id/date" android:layout_width="150.0dip" android:layout_height="39.0dip" android:layout_marginLeft="8.0dip" android:layout_marginRight="4.0dip" android:maxLines="1" />
<com.android.systemui.statusbar.RotationToggle android:id="@id/rotation_lock_button" android:visibility="gone" android:clickable="true" android:layout_width="32.0dip" android:layout_height="32.0dip" android:layout_margin="8.0dip" android:button="@drawable/ic_notify_rotation" android:contentDescription="@string/accessibility_rotation_lock_off" />
</LinearLayout>
Mods, if i have posted this in the wrong section, please move accordingly.
Edit:- I finally worked it out
Checkout my tutorial Single Line Notification Date

[02/06] [How to] Custom txt/Carrier/center clock/custom icons/left side icons etc

Hello there
Here is a simple guide to add a Custom name to top-left status bar.
All You need is:
- Know how to decompile/recompiling Apk file
- notepad++
- Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools ...
1. Decompile SystemUI.apk
2. navigate to res/layout/status_bar.xml
3.Open Status_bar.xml with notepad++
4.Copy this line like the following example:
Code:
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:text="@string/hello" android:singleLine="true" />
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.PhoneStatusBarView android:orientation="vertical" android:id="@id/status_bar" android:background="@drawable/status_bar_background" android:focusable="true" android:fitsSystemWindows="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<ImageView android:id="@id/notification_lights_out" android:paddingBottom="2.0dip" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" android:paddingStart="6.0dip" />
<LinearLayout android:orientation="horizontal" android:id="@id/status_bar_contents" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingStart="6.0dip" android:paddingEnd="6.0dip">
<LinearLayout android:orientation="horizontal" android:id="@id/notification_icon_area" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
[COLOR="Red"][B] <TextView android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:text="@string/hello" android:singleLine="true" />[/B][/COLOR]
<com.android.systemui.statusbar.StatusBarIconView android:id="@id/moreIcon" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" />
<com.android.systemui.statusbar.phone.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentStart="true" />
</LinearLayout>
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
<LinearLayout android:gravity="right|center" android:orientation="horizontal" android:id="@id/system_icon_area" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
<LinearLayout android:gravity="right|center" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
<LinearLayout android:gravity="right|center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.Traffic android:textAppearance="@style/TextAppearance.StatusBar.Traffic" android:gravity="left|center" android:id="@id/traffic" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_view" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Battery" android:gravity="center" android:id="@id/battery_text" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
<com.erryy.BatteryText android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textSize="12.0dip" android:gravity="center" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginRight="-3.0dip" android:singleLine="true" />
<ImageView android:id="@id/battery" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingStart="4.0dip" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingStart="6.0dip">
<ImageSwitcher android:id="@id/tickerIcon" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:layout_marginEnd="4.0dip">
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:scaleType="center" />
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:scaleType="center" />
</ImageSwitcher>
<com.android.systemui.statusbar.phone.TickerView android:id="@id/tickerText" android:paddingTop="2.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_weight="1.0" android:paddingEnd="10.0dip">
<TextView android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
</com.android.systemui.statusbar.phone.TickerView>
</LinearLayout>
</com.android.systemui.statusbar.phone.PhoneStatusBarView>
"android:textAppearance="@style/TextAppearance.StatusBar.Clock" means that your custom text will have same colors and dimensions defined for clock (these are defined in /values/styles: 16dip and Holo Blue Light ).
If You want to add Your dip and your preferred color, just replaces above line with this:
android:textSize="15.0dip" android:textColor="#ffa6a6a6"
Code:
<TextView [COLOR="Red"]android:textSize="15.0dip" android:textColor="#ffa6a6a6"[/COLOR] android:gravity="left|center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:text="@string/hello" android:singleLine="true" />
You can change text color and size to fit your needs.
android:textSize="x.0dip"
and android:textColor="#hex code of Your preferred color"
for example #ffdd4814 is Ubuntu Orange
5) Now, the last step:
Navigate to res/values/string
and add this at the end of the file:
Code:
<string name="hello">Your text here</string>
Like this example:
Code:
... <string name="quick_settings_rssi_label">RSSI</string>
<string name="quick_settings_rssi_emergency_only">Emergency Calls Only</string>
<string name="quick_settings_settings_label">Settings</string>
<string name="quick_settings_time_label">Time</string>
<string name="quick_settings_user_label">Me</string>
<string name="quick_settings_wifi_label">Wi-Fi</string>
<string name="quick_settings_wifi_not_connected">Not Connected</string>
<string name="quick_settings_wifi_no_network">No Network</string>
<string name="quick_settings_wifi_off_label">Wi-Fi Off</string>
<string name="quick_settings_wifi_display_label">Wi-Fi Display</string>
<string name="quick_settings_wifi_display_no_connection_label">Wireless Display</string>
<string name="quick_settings_brightness_dialog_title">Brightness</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label">AUTO</string>
<string name="status_bar_help_title">Notifications appear here</string>
<string name="status_bar_help_text">"Access them anytime by swiping down.
Swipe down again for system controls."</string>
<string name="accessibility_sleep_button">Sleep button.</string>
[COLOR="Red"]<string name="hello">Your text here</string>[/COLOR]
</resources>
6) Recompile back ... enjoy!!
{
"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"
}
Service Provider
White clock & wifi/battery/signal white resources [how to]
Center Clock, left signals and how to replace battery/signal/wifi icons with custom
Add a text between signal icons!​
Guidelines to correctly set jdk in Windows and Linux​
To Flash Your Mods use a flashable template (Use a zip manager to add SystemUI inside)!
KitKat (put SystemUI inside priv-app folder)
View attachment flashable_template_KK.zip
Jellybean (put SystemUI inside app folder)
View attachment flashable_template_JB.zip
Simple Guide to use Apktool​
LOWERCASE TXT????
ADD THIS TO YOUR TEXTVIEW
Code:
android:textAllCaps="false"
do you do this custom?
Zpik said:
do you do this custom?
Click to expand...
Click to collapse
what you mean???
Better idea:
make an app
Sent from my Nexus 4 using Tapatalk 4
enricocid said:
Hello there
Here is a simple guide to add a Custom name to top-left status bar./QUOTE]
How can i put current gsm provider name as a parameter like in miui theme ?
Click to expand...
Click to collapse
adamslast said:
enricocid said:
Hello there
Here is a simple guide to add a Custom name to top-left status bar./QUOTE]
How can i put current gsm provider name as a parameter like in miui theme ?
Click to expand...
Click to collapse
decompile systemUI and navigate to /res/layout
and open
status_bar.xml
add the red line like in example:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.PhoneStatusBarView android:id="@id/status_bar" android:background="@drawable/status_bar_background" android:focusable="true" android:fitsSystemWindows="true" android:descendantFocusability="afterDescendants" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<ImageView android:id="@id/notification_lights_out" android:paddingLeft="6.0dip" android:paddingBottom="2.0dip" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" />
<LinearLayout android:orientation="horizontal" android:id="@id/status_bar_contents" android:paddingLeft="6.0dip" android:paddingRight="6.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="horizontal" android:id="@id/notification_icon_area" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
[COLOR="red"]<com.android.systemui.statusbar.phone.CarrierLabel android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />[/COLOR]
<com.android.systemui.statusbar.StatusBarIconView android:id="@id/moreIcon" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" />
<com.android.systemui.statusbar.phone.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentLeft="true" />
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:id="@id/system_icon_area" android:layout_width="wrap_content" android:layout_height="fill_parent">
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_view" />
<include android:id="@id/signal_cluster_text" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_text_view" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Battery" android:gravity="left|center" android:id="@id/dock_battery_text" android:paddingLeft="@dimen/status_bar_battery_cluster_padding" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginRight="@dimen/status_bar_battery_cluster_text_margin" android:singleLine="true" />
<ImageView android:id="@id/dock_battery" android:paddingLeft="@dimen/status_bar_battery_cluster_padding" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<com.android.systemui.statusbar.policy.CircleDockBattery android:textAppearance="@style/TextAppearance.StatusBar.Battery" ... etc etc ...
etc ... etc ... etc ... etc ... ... ... ... ... ... ... ...
if You want to get other colors instead of Holo
simply delete android:textAppearance="@style/TextAppearance.StatusBar.Clock"
Code:
<com.android.systemui.statusbar.phone.CarrierLabel [U][B]android:textAppearance="@style/TextAppearance.StatusBar.Clock" [/B][/U]android:gravity="left|center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
and add this:
Code:
<TextView android:textSize="15.0dip" android:textColor="#ffa6a6a6"
Code:
<com.android.systemui.statusbar.phone.CarrierLabel [B][COLOR="Lime"]<TextView android:textSize="[COLOR="Blue"]16.0dip[/COLOR]" android:textColor="#[COLOR="Blue"]ffa6a6a6[/COLOR]"[/COLOR] [/B]android:gravity="left|center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
and choose your preferred dimension and your preferred color (the hex code)
then extract the attached smalis
View attachment CarrierLabel_source.zip
and put inside
smali/com/android/systemui/statusbar/phone/
recompile back and you're done!
Click to expand...
Click to collapse
Thanks. I will try it right away. But a last question: Which decompile and compile application do you recommend? I tried APK multitool but I can not compile and i allways have an error 21 message.
Edit: in Androidmultitools, when i try to compile after changes you mentioned i got this error message:
"I: Checking whether sources has changed...
I: Smaling...
[0,0] No enum constant org.jf.dexlib.AnnotationVisibility.RUNTİME
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: C:\AndroidMultitool_2.1_Win7\AndroidMultitool\Decompiled_apk\SystemUI\smali\com\android\systemui\statusbar\AnimatedImageView.smali
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:45)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:66)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:50)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:37)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:257)
at brut.androlib.Androlib.buildSources(Androlib.java:214)
at brut.androlib.Androlib.build(Androlib.java:205)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Sistem belirtilen dosyay bulamyor.
Sistem belirtilen dosyay bulamyor."
(Sistem belirtilen dosyay bulamyor.) means (system could not find defined file.)
What is wrong do you have an idea?
adamslast said:
Thanks. I will try it right away. But a last question: Which decompile and compile application do you recommend? I tried APK multitool but I can not compile and i allways have an error 21 message.
Edit: in Androidmultitools, when i try to compile after changes you mentioned i got this error message:
"I: Checking whether sources has changed...
I: Smaling...
[0,0] No enum constant org.jf.dexlib.AnnotationVisibility.RUNTİME
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: C:\AndroidMultitool_2.1_Win7\AndroidMultitool\Decompiled_apk\SystemUI\smali\com\android\systemui\statusbar\AnimatedImageView.smali
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:45)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:66)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:50)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:37)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:257)
at brut.androlib.Androlib.buildSources(Androlib.java:214)
at brut.androlib.Androlib.build(Androlib.java:205)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Sistem belirtilen dosyay bulamyor.
Sistem belirtilen dosyay bulamyor."
(Sistem belirtilen dosyay bulamyor.) means (system could not find defined file.)
What is wrong do you have an idea?
Click to expand...
Click to collapse
I'm using apktool ... I've never user this..
http://forum.xda-developers.com/showthread.php?p=28366939
Are you using linux (32 or 64 bit ?) or windows?
You coukd try to delete all installed frameworks and install it again
http://code.google.com/p/android-apktool/issues/detail?id=505
d\systemui\sta tusbar\AnimatedImageView.smali
is this renamed badly or is it only bad copy&paste here?
enricocid said:
I'm using apktool ... I've never user this..
http://forum.xda-developers.com/showthread.php?p=28366939
Are you using linux (32 or 64 bit ?) or windows?
You coukd try to delete all installed frameworks and install it again
http://code.google.com/p/android-apktool/issues/detail?id=505
d\systemui\sta tusbar\AnimatedImageView.smali
is this renamed badly or is it only bad copy&paste here?
Click to expand...
Click to collapse
I am using win7 64 bit in Turkish. I think this happens because of language and turkish characters. Especially in Turkish majuscule (i) is (İ) instead of (I) as it is in mainly western languages. I think that makes a unharmoniesness in application. I changed clavier in english, but does not work still because language is Turkish. Unfortunately changing language is no t possible once you install it in certain langue. Now i will try it to do in linux. Many thanks for your help.
btw the way, i could not find d\systemui\sta tusbar\AnimatedImageView.smali. is there a typing error or is my bad?
adamslast said:
I am using win7 64 bit in Turkish. I think this happens because of language and turkish characters. Especially in Turkish majuscule (i) is (İ) instead of (I) as it is in mainly western languages. I think that makes a unharmoniesness in application. I changed clavier in english, but does not work still because language is Turkish. Unfortunately changing language is no t possible once you install it in certain langue. Now i will try it to do in linux. Many thanks for your help.
btw the way, i could not find d\systemui\sta tusbar\AnimatedImageView.smali. is there a typing error or is my bad?
Click to expand...
Click to collapse
yes.. i think this is the problem. If you will use apktool in a 64bit linux distro, be sure to install necessary dependencies to avoid error 2 during compilation, because aapt & others are 32bit commands and need ia32-libs package to work correctly ...
so, apt-get install ia32-libs
enricocid said:
yes.. i think this is the problem. If you will use apktool in a 64bit linux distro, be sure to install necessary dependencies to avoid error 2 during compilation, because aapt & others are 32bit commands and need ia32-libs package to work correctly ...
so, apt-get install ia32-libs
Click to expand...
Click to collapse
I tried during tha last 4 days to compile systemui.apk file using almost every application, but no succes. I tried it on my win8 tablet in english language. İt decompile and compile the file unchanged, but not changed one. I have not installed linux unfortunately. I would be very grateful if you try compiling in linux maguro_JRW66Y stock and changed systemui files added below.
adamslast said:
I tried during tha last 4 days to compile systemui.apk file using almost every application, but no succes. I tried it on my win8 tablet in english language. İt decompile and compile the file unchanged, but not changed one. I have not installed linux unfortunately. I would be very grateful if you try compiling in linux maguro_JRW66Y stock and changed systemui files added below.
Click to expand...
Click to collapse
so i have to modify systemUI contained in stockfiles like the 2nd one? ok. tomorrow I will make it :good:
enricocid said:
so i have to modify systemUI contained in stockfiles like the 2nd one? ok. tomorrow I will make it :good:
Click to expand...
Click to collapse
Great! Thanks. :victory:
Edit: btw there are three changes.
1.Service Provider Name 2. Wireless speed 3.Invisible Power Menu.
But I was unsuccesful even with one change.
@enricocid
Very sorry. Could you take into consideration I newly added "SystemUI_SPN_WS_IPMI.zip" file please. Thanks.
adamslast said:
@enricocid
Very sorry. Could you take into consideration I newly added "SystemUI_SPN_WS_IPMI.zip" file please. Thanks.
Click to expand...
Click to collapse
OK k
adamslast said:
@enricocid
Very sorry. Could you take into consideration I newly added "SystemUI_SPN_WS_IPMI.zip" file please. Thanks.
Click to expand...
Click to collapse
@adamslast what are the changes You did?
I see no changes in res folder
Have You changed only the smali folder? Will I have to replace smali folder and recompile back?
here is recompiled systemUI without errors:
View attachment SystemUI.apk
enricocid said:
@adamslast what are the changes You did?
I see no changes in res folder
Have You changed only the smali folder? Will I have to replace smali folder and recompile back?
here is recompiled systemUI without errors:
View attachment 2313552
Click to expand...
Click to collapse
So many thanks! :good:
The changes are in status_bar.xml, ids.xml and styles.xml. I also add some java files in smali folder, two as you mentioned in your post. Mainly changes other than yours are:
1. http://forum.xda-developers.com/showthread.php?t=2241739
2. http://forum.xda-developers.com/showpost.php?p=35864541&postcount=785.
I will try it right now. Your help very appreciated.
adamslast said:
So many thanks! :good:
The changes are in status_bar.xml, ids.xml and styles.xml. I also add some java files in smali folder, two as you mentioned in your post. Mainly changes other than yours are:
1. http://forum.xda-developers.com/showthread.php?t=2241739
2. http://forum.xda-developers.com/showpost.php?p=35864541&postcount=785.
I will try right now and i hope to give a good feedback. Your help very appreciated.
Click to expand...
Click to collapse
ok.. I found the error
Code:
<com.android.systemui.statusbar.phone.CarrierLabel [COLOR="Red"]<TextView[/COLOR] android:textSize="15.0dip" android:textColor="#ffffff" android:gravity="left|center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
<TextView is a Class that displays text to the user and optionally allows them to edit it. A TextView is a fixed text...
Here You are using <com.android.systemui.statusbar.phone.CarrierLabel that let You to display the Carrier Label using smali to display a dinamic text
so You can't use two classes in one line
When You want to modify color and dip of <com.android. etc ... ... ... > You should add
Code:
android:textSize="15.0dip" android:textColor="#ffffff"
The correct one is this:
Code:
<com.android.systemui.statusbar.phone.CarrierLabel [COLOR="Red"]android:textSize="15.0dip" android:textColor="#ffffff"[/COLOR] android:gravity="left|center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
For example, in KBmeter guide, if You wanna change the color and dip of the kbmeter
Code:
<com.android.systemui.statusbar.policy.Traffic android:textAppearance="@style/TextAppearance.StatusBar.Traffic" android:gravity="right|center" android:id="@id/traffic" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
Then delete android:textAppearance="@style/TextAppearance.StatusBar.Traffic"
Code:
<com.android.systemui.statusbar.policy.Traffic [COLOR="Red"]android:textAppearance="@style/TextAppearance.StatusBar.Traffic"[/COLOR] android:gravity="right|center" android:id="@id/traffic" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
and add android:textSize="15.0dip" android:textColor="#ffffff" ... like this:
Code:
<com.android.systemui.statusbar.policy.Traffic [COLOR="Red"]android:textSize="15.0dip" android:textColor="#ffffff"[/COLOR] android:gravity="right|center" android:id="@id/traffic" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
Once done, You can delete also the style You created in /values/styles.xml
Code:
<style name="TextAppearance.StatusBar.Traffic" parent="@style/TextAppearance.StatusBar.Clock">
<item name="android:textSize">14.0dip</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">#ffffffff</item>
<item name="android:textAllCaps">false</item>
</style>
and recompile back
Here is the files corrected
View attachment SystemUI.apk
View attachment status_bar.zip
enricocid said:
ok.. I found the error
Here is the files corrected
View attachment 2313666
View attachment 2313668
Click to expand...
Click to collapse
All changes properties work great. The only thing left to do is changing the color of the signals and the clock from blue to white like others. Could you give me some ideas about how to do it please, if you dont mind. Many thanks.
adamslast said:
All changes properties work great. The only thing left to do is changing the color of the signals and the clock from blue to white like others. Could you give me some ideas about how to do it please, if you dont mind. Many thanks.
Click to expand...
Click to collapse
For clock:
decompile systemUI I give to You yesterday
Navigate in /res/values/styles.xml
and open it
search for
Code:
<style name="TextAppearance.StatusBar.Clock" parent="@*android:style/TextAppearance.StatusBar.Icon">
<item name="android:textSize">16.0dip</item>
<item name="android:textStyle">normal</item>
[COLOR="Red"]<item name="android:textColor">@*android:color/holo_blue_light</item>[/COLOR]
</style>
Change it like this:
Code:
<style name="TextAppearance.StatusBar.Clock" parent="@*android:style/TextAppearance.StatusBar.Icon">
<item name="android:textSize">16.0dip</item>
<item name="android:textStyle">normal</item>
[COLOR="Red"]<item name="android:textColor">#ffffffff</item>[/COLOR]
</style>
@adamslast
To change icons to white simply copy and paste this resources in drawable-xhdpi (in decompiled SystemUI) folder overwriting the originals ones
View attachment RESOURCES.zip

Categories

Resources