[SOLVED] Help In Adding Visible Brightness Slider To CM11 Statusbar - Android Q&A, Help & Troubleshooting

Im trying to get a visible brightness slider on the status bar of CM11
What I tried to do was take the brightness slider that is already in the quick settings pannel when you select the brightness tile and put the slider itself onto the status bar - Therefore you dont have to select the brightness tile for the slider to appear in a new window because the slider would be on the statusbar itself
so here is my problem - I have got the slider on the status bar and it works in all respects apart from it doesnt actually change the brightness level
So can someone have a look at my xml and work out what needs to be added in order for the slider to change the level of brightness
This is what I have done to get the screen shot results below
in status_bar_expanded under
Code:
<ViewStub android:id="@id/ribbon_settings_stub" android:layout="@layout/ribbon_settings" android:layout_width="fill_parent" android:layout_height="@dimen/notification_min_height" />
added
Code:
<include layout="@layout/marcus_brightness" />
here is the xml of marcus_brightness
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout style="@style/BrightnessDialogContainer"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<ImageView android:layout_gravity="center_vertical" android:id="@id/brightness_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_qs_brightness_auto_off" android:paddingStart="8.0dip" android:paddingEnd="10.0dip" />
<com.android.systemui.settings.ToggleSlider android:layout_gravity="center_vertical" android:id="@id/brightness_slider" android:layout_width="0.0dip" android:layout_height="48.0dip" android:layout_weight="1.0" android:layout_marginEnd="2.0dip" />
</LinearLayout>
so my question is what needs to be added/changed to marcus_brightness in order for the slider to change the level of brightness since this xml is basically a copy of the xml which loads then you select the brightness tile and brings up the window with the brightness slider that does work
It looks like toggleslider.smali is just for the slider and does not control the brightness however the xml file for the brightness slider in the tile does not refer to any other smali although there are brightness smali files in smali\com\android\systemui\settings although im not sure how to include these in any layout and I cant work out the reason why the brightness slider works in the tile but not if its moved to the statusbar itself - There must be something that is being refered to that I am missing
{
"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"
}

I have now solved this so I am closing the thread
you can see my guide
http://forum.xda-developers.com/android/general/guide-how-to-add-visible-brightness-t2801134

Related

[Q] About framework

{
"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"
}
How to change that yellow color to blue or other color ? I should edit or add any xml file on framework-re.apk ?
Please help me with this... I want to change the yellow color to cyan color...
Well, it is in an xml file. You'll first need to decompile the framework-res.apk then open the relevant xml file. Can't remember off hand what it's called, but it's something like horizontal_progress and vertical_progress, most probably in one of the layout folders. You'll then need to find the colour values and changes them to what you want.
Sorry, not been much help, but hope it gives you something to go on.
There is no landscape_progress and horizantal progress.. There is some xml files and there is preference.xml and preference_dialog.xml
preference.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<ImageView android:layout_gravity="center_vertical" android:background="@drawable/btn_circle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="4.0dip" android:src="@drawable/ic_btn_round_more"
xmlns:android="http://schemas.android.com/apk/res/android" />
preference_dialog.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:orientation="horizontal" android:id="@id/body" android:paddingLeft="8.0dip" android:paddingTop="10.0dip" android:paddingRight="8.0dip" android:paddingBottom="10.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:baselineAligned="false">
<ProgressBar android:id="@id/progress" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="12.0dip" android:max="10000" style="@android:style/Widget.ProgressBar" />
<TextView android:layout_gravity="center_vertical" android:id="@id/message" android:layout_width="fill_parent" android:layout_height="wrap_content" />
</LinearLayout>
</FrameLayout>
L0cke said:
Well, it is in an xml file. You'll first need to decompile the framework-res.apk then open the relevant xml file. Can't remember off hand what it's called, but it's something like horizontal_progress and vertical_progress, most probably in one of the layout folders. You'll then need to find the colour values and changes them to what you want.
Sorry, not been much help, but hope it gives you something to go on.
Click to expand...
Click to collapse
Can you remember the xml file name ?
Almost right.....
progress_horizontal.xml located in framework-res.apk/res/drawable/
use a hex colour chart to help you if you dont have any image editing software, here's an online chart
http://www.colorschemer.com/online.html
When editing the code you need to follow the ARGB layout:
A=Alpha(transparency/Opacity) 00=transparent ff=opaque
R=Red
G=Green
B=Blue
Edit the parts highlighted in red, there are 3 lines this is just one:
<gradient android:startColor="#50007fff" android:endColor="#80070274" android:angle="270.0" android:centerColor="#800018ff" />
Hope this helps, if you need any more find me over here-
http://forum.xda-developers.com/showthread.php?t=1433053

[GUIDE][ICS] Custom Carrier Label for Stock / Stock Based ROM

I just found the trick to manipulate carrier label on notification bar when I'm exploring decompiled stock based SystemUI.apk..
Wanna know how to do that ??
Check this out :
Here I'm using lidroid's modified SystemUI, should work on other stock based SystemUI
First you need to decompile your SystemUI.apk
Open res/layout/status_bar_tracking.xml with any good xml editor (here I'm using NP++)
Find this line:
Code:
<com.android.systemui.statusbar.phone.CarrierLabel android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textColor="#ff33b5e5" android:gravity="center" android:layout_gravity="bottom" android:paddingBottom="20.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" />
and change to:
Code:
<textView android:text="@string/carrier_label" android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textColor="#ff33b5e5" android:gravity="center" android:layout_gravity="bottom" android:paddingBottom="20.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" />
Save
Now open res/values/strings.xml
Add this line above </resources> :
Code:
<string name="carrier_label">ENTER_YOUR_COOLEST_TEXT_HERE</string>
so it'll be looked a like this:
Code:
<string name="carrier_label">ENTER_YOUR_COOLEST_TEXT_HERE</string>
</resources>
p.s. : change the ENTER_YOUR_COOLEST_TEXT_HERE with your desired label
Now save
Recompile (build) your SystemUI.apk
Push to your phone and you are.......
Done !!
The result will be looked like 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"
}
Mine :
Remember to
ALWAYS MAKE BACKUP !!
before doing anything above..
I don't responsible of any negative things like bootloop, bricked device, burned SD card, you late to go to school, or the third world war caused by the guide above..
You have been warned !!
Click to expand...
Click to collapse
Good luck..
nice find mate .. thanks for the share
if you lazy to do ,try this app http://forum.xda-developers.com/showthread.php?t=901865
dont know if it work on ICS ,just try its easier for noob like me
btw thanks for share :good:
Does anyone now how to bring the Carrier Label in the bottom of the statusbar Expanded view, in Gingerbread? Tried searching the forum and google, but with no luck...
iiandskater said:
i just found the trick to manipulate carrier label on notification bar when i'm exploring decompiled stock based systemui.apk..
Wanna know how to do that ??
Check this out :
here i'm using lidroid's modified systemui, should work on other stock based systemui
first you need to decompile your systemui.apk
open res/layout/status_bar_tracking.xml with any good xml editor (here i'm using np++)
find this line:
Code:
<com.android.systemui.statusbar.phone.carrierlabel android:textappearance="@style/textappearance.statusbar.clock" android:textcolor="#ff33b5e5" android:gravity="center" android:layout_gravity="bottom" android:paddingbottom="20.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" />
and change to:
Code:
<textview android:text="@string/carrier_label" android:textappearance="@style/textappearance.statusbar.clock" android:textcolor="#ff33b5e5" android:gravity="center" android:layout_gravity="bottom" android:paddingbottom="20.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" />
save
now open res/values/strings.xml
add this line above </resources> :
Code:
<string name="carrier_label">enter_your_coolest_text_here</string>
so it'll be looked a like this:
Code:
<string name="carrier_label">enter_your_coolest_text_here</string>
</resources>
p.s. : Change the enter_your_coolest_text_here with your desired label
now save
recompile (build) your systemui.apk
push to your phone and you are.......
done !!
the result will be looked like this :
mine :
good luck..
Click to expand...
Click to collapse
ur status bar is so cool i mean d icons can u make a zip and share???
What do you use to decompile/recompile? Also can you set the clock in the middle of the status bar?
Sent from my SPH-D710 using xda premium
i try but it do not work.
i think my room need more edit at: res\values\public.xlm but i do not know add line:
<public type="string" name="carrier_label" id="0x7f08001c" />
cool
looks very nice bro
Hi, will this work on jellybean??

Help regarding New Warmspace theme of MIUI Free Launcher!

Ok, I'm running on this ROM on my Mini Pro and I'm using this Theme:
Now my question is, how can I resize this theme for MDPI i.e. how do I edit the theme.. MIUI Theme editor didn't do the trick for me..
Thank you!
Sorry for the bump... But anybody??
hmnk said:
Ok, I'm running on this ROM on my Mini Pro and I'm using this Theme:
Now my question is, how can I resize this theme for MDPI i.e. how do I edit the theme.. MIUI Theme editor didn't do the trick for me..
Thank you!
Click to expand...
Click to collapse
Id kill for that theme :thumbup:
Sent from my SK17i using xda app-developers app
I downloaded directly from the themes app, but when applied the launcher stops responding
jpcosta said:
I downloaded directly from the themes app, but when applied the launcher stops responding
Click to expand...
Click to collapse
The previous versions of this theme wouldn't work on the previous versions of MIUI for my phone.. SO it's either the ROM version or the theme version that did the trick for me..
Ok, I've figured out how to edit the various elements.
Just one thing remains. I need to change the source of weather from MIUI weather to fancywidgets. I will post the codes related to the weather in the above theme. Don't know if what I'm posting is enough or not, but if anyone can, please do help
Code:
<sprite id="weather" type="button" index="11" left="2004" top="140" normal="weather.png">#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10200000;component=com.miui.weather2/.ActivityWeatherCycle;end</sprite>
Code:
<?xml version="1.0" encoding="utf-8"?>
<!--窗帘动画-->
<gadget version="1.0" width="720" height="600" screenWidth="720">
<!--查询天气-->
<VariableBinders>
<ContentProviderBinder
uri="content://weather/weather"
columns="city_name,temperature,temperature_range,description,weather_type"
countName="hasweather">
<Variable name="weather_id" type="int" column="weather_type"/>
<Variable name="weather_location" type="string" column="city_name"/>
<Variable name="weather_temperature" type="int" column="temperature"/>
<Variable name="weather_temperature_range" type="string" column="temperature_range"/>
<Variable name="weather_description" type="string" column="description"/>
</ContentProviderBinder>
</VariableBinders>
<!--panel-->
<VirtualScreen name="screenview" w="720" h="600">
<Group x="0" y="0">
<Var name="has_night_icon" expression="eq(#weather_id,0)+eq(#weather_id,1)"/>
<Var name="icon_suffix" expression="ifelse(#has_night_icon*not(ge(#hour24,6)*le(#hour24,17)),'b','a')" type="string"/>
<Image x="0" y="0" srcExp="'weather_'+ @icon_suffix +'3_' + #weather_id + '.jpg'" />
</Group>
</VirtualScreen>
<Image src="screenview" srcType="VirtualScreen" x="0" y="0"/>
</gadget>
I have tried changing the app package and class info in the theme(which has worked for other apps), but that isn't enought to enable the theme to read the weather forecast from fancy widgets.
{
"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"
}
If you download the above theme, you will better understand the structure of the files contained in the above theme.
Thanks!!

How to make a Floating Statusbar Like a Phablet/Tablet

Hi mates I just want to share this guide of How to make a Floating Statusbar Like a Phablet/Tablet
{
"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"
}
Original Thread
Hello, i just try to make my phone like a phablet/tablet with 4.0.4 or 4.1.2 android os last time, but i don't know i can make it a simple or not.
But now i can make it a "pop up manipulation" with some background manipulation too. So, here we go the tutorial will start now!
The first of this tutorial you must know about :
1. How to decompile/compile the apk file (don't ask here, you can search on google how to do that)
2. How to coding a xml file with some code
3. You must have a Apktool/ApkManager/ToolAlite by KuyaGaol
4. You must have a JDK and Latest Net framework for run Apktool/ApkManager/ToolAlite by KuyaGaol
5. You must take a beer! lol
Oke the first method is :
1. Download my Floating.zip
2. Pull the Framework-res.apk and SystemUI.apk
3. Do "if framework" on your Apktool/ApkManager/ToolAlite by KuyaGaol
4. Decompile SystemUI.apk
5. Extract my Floating.zip to your drawable directory. (you can extract on "drawable" or "drawable-mdpi" folder).
6. Open status_bar.xml from /res/layout/here and find this code, modify and save :
Code:
<com.android.systemui.statusbar.DateView android:textAppearance="@android:style/TextAppearance.StatusBar.Icon"
and add this line code :
Code:
android:background="@drawable/trans"
or paste my line :
Code:
<com.android.systemui.statusbar.DateView android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textColor="#00000000" android:gravity="center" android:id="@id/date" android:background="@drawable/trans" android:paddingLeft="6.0px" android:paddingRight="6.0px" android:layout_width="fill_parent" android:layout_height="fill_parent" android:singleLine="true" />
7. Open status_bar_expanded.xml from /res/layout/here and find this code, modify and save :
Code:
<com.android.systemui.statusbar.ExpandedView android:orientation="vertical"
and add this line code :
Code:
android:background="@drawable/bg"
or paste my line :
Code:
<com.android.systemui.statusbar.ExpandedView android:orientation="vertical" android:background="@drawable/bg" android:focusable="true" android:descendantFocusability="afterDescendants"
8. Open status_bar_tracking.xml from /res/layout/here and find this code. modify and save :
Code:
<View android:background="@drawable/shade_bg" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1.0" />
and change to this line :
Code:
<View android:background="@drawable/shade_bg" android:layout_width="0.0px" android:layout_height="0.0px" android:layout_weight="1.0" />
Find this line :
Code:
<ImageView android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/status_bar_close_on" android:scaleType="fitXY" />
and change to this line :
Code:
<ImageView android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/trans" android:scaleType="fitXY" />
9. Recompile your SystemUI.apk project and push it to your phone to the /system/app directory
Thanks To :
- Rizalien
- Official Group Galaxy Young Indonesia
- Official Group Sony Xperia X8 Indonesia
- Tiny Anastasia Development Group
- DCSMS
@petrukgrinder
- and YOU!
Click to expand...
Click to collapse
markmellarpes said:
Hi mates I just want to share this guide of How to make a Floating Statusbar Like a Phablet/Tablet
Original Thread
Click to expand...
Click to collapse
contact mr mardon i think he may help you brother cos he has made transparency patches for his rom too

Quick button in the status bar

{
"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"
}
Hi all! L9 has no mechanical button(quick button LG L5II,L7II),but there is support.A virtual button can be useful for you.Make it simple:
Decompile lge-res.apk and LGSystemUI.apk.In lge-res.apk,in bools.xml(lge-res\res\values)set "true" in line and compile:
Code:
<bool name="config_quick_memo_hotkey_customizing">false</bool>
In LGSystemUI.apk,in status_bar.xml(LGSystemUI\res\layout)after row:
Code:
<com.lge.systemui.StatusBarLinearLayout android:orientation="horizontal" android:id="@id/icons" android:tag="NO_R2L" android:paddingLeft="6.0dip" android:paddingRight="6.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent">
Paste:
Code:
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/back" android:layout_width="25dip" android:layout_height="fill_parent" android:src="@drawable/hotkey" android:layout_toRightOf="@id/recent_apps" android:contentDescription="@string/accessibility_back" systemui:keyCode="225" systemui:glowBackground="@drawable/lock_bg" />
In drawable-hdpi(LGSystemUI/res)move the images from the archive and compile
View attachment hotkey.png.zip
Sorry for my ENG
The L9 has a button for quickmemo, its between the volume buttons, press the center of the volume rocker for quick memo
Sent from my LG-P768 using xda app-developers app
donk165 said:
The L9 has a button for quickmemo, its between the volume buttons, press the center of the volume rocker for quick memo
Sent from my LG-P768 using xda app-developers app
Click to expand...
Click to collapse
Quick memo is not what he is talking about. Quick button is a toggle you can press to select a specific quick app you want to launch..
Lgeob said:
View attachment 2463127 View attachment 2463126 View attachment 2463255
Hi all! L9 has no mechanical button(quick memo LG L5II,L7II),but there is support.A virtual button can be useful for you.Make it simple:
Click to expand...
Click to collapse
Thanks for the info, I changed 25dpi to 0dpi, I don't want to see the hotkey icon on the status bar.
Question, do you know where to disable the hotkey mapping to QuickMemo3.apk?
If I have QuickMemo3.apk installed when I press the hotkey, the other app and QuickMemo3.apk open at the same time. I have to remove QuickMemo3.apk so I can use just the new hotkey.
systemui:keyCode="225"
kuma82 said:
Thanks for the info, I changed 25dpi to 0dpi, I don't want to see the hotkey icon on the status bar.
Question, do you know where to disable the hotkey mapping to QuickMemo3.apk?
If I have QuickMemo3.apk installed when I press the hotkey, the other app and QuickMemo3.apk open at the same time. I have to remove QuickMemo3.apk so I can use just the new hotkey.
systemui:keyCode="225"
Click to expand...
Click to collapse
I do not know why it is so,so did a virtual button.This only appears on LG L9,for example LG L4II(it also works) this is not observed.Perhaps we should look framework.jar
Sorry for my eng

Categories

Resources