Quantcast
Channel: xda-developers - Android Themes
Viewing all articles
Browse latest Browse all 4090

[GUIDE][CM10] How to Added PERMANENT BRIGHTNESS BAR TO NOTIFICATION PANEL

$
0
0
How to Added PERMANENT BRIGHTNESS BAR TO NOTIFICATION PANEL for CM10



Hi..Hi..Hello XDA :D, especially for Developer only
I want to share to you all how to added permanent brigtness bar to notification panel for your Devices running CyanogenMod 10

Basically the guide is for Gingerbread, and I use all smali file and code from here http://forum.xda-developers.com/show....php?t=2152370
so full credit goes to evanlocked
I just made some change and fix to suit for Device running CM10 :)

WARNING !!!
But there is a little bug on this Mod, if you enable Automatic Brightness from your SETTINGS - DISPLAY -BRIGHTNESS - , the brightness Bar will dissappear from notification panel, and never want to show again, so make sure before and after applying this mod, never to do that :)

SEE THE SCREENSHOT :


If you can see, there is an Automatic brightness check box,
and the check box is only a fake check box, doesn't have accessibility to access Automatic brightness of our Device. so you are free to tick/check list it, and the brightness bar will not dissapear. :)

ok lets go to Guide:
first of all need some requirement for this MOD-GUIDE

REQUIREMENT:
- BRAIN
- Patient
- experience
- Know how to decompile/recompiling Apk file
- notepad++
- Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools/ or else



STEP 1
Decompile your SytemUI.apk, go to
res/values/ids.xml
and add this line to the end
Code:

<item type="id" name="automatic">false</item>
NEXT - STEP -2
res/values/strings.xml
Add these two lines to the end
Code:

<string name="brightness_settings_automatic">AUTO</string>
<string name="brightness_settings_title" />

NEXT - STEP -3
res/layout/status_bar_expanded.xml
and add the RED line code
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">
    <TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network" android:gravity="center" android:layout_gravity="bottom" android:id="@id/carrier_label" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="@dimen/carrier_label_height" android:layout_marginBottom="@dimen/close_handle_height" />
    <LinearLayout android:orientation="vertical" 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/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
        <com.android.systemui.statusbar.powerwidget.PowerWidget android:id="@id/exp_power_stat" android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_widget_height" />
        <include layout="@layout/adi_brightness" />
        <TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network.EmergencyOnly" android:gravity="center" android:id="@id/emergency_calls_only" android:paddingBottom="4.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" />
        <ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:overScrollMode="always">
            <com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_row_min_height" />
        </ScrollView>
    </LinearLayout>
    <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/close_handle_height">
        <ImageView android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/close_handle_height" android:src="@drawable/status_bar_close" android:scaleType="fitXY" />
    </com.android.systemui.statusbar.phone.CloseDragHandle>
</FrameLayout>



NEXT - STEP -4
res/layout/status_bar_expanded_header
LINE xml 2
Code:

<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="false"

NEXT - STEP -5
Download the brightness bar source according to your device category :

Source_Brightness_HDPI

Source_Brightness_XHDPI

Source_Brightness_MDPI

Source_Brightness_LDPI


NEXT - STEP -6
Extract you have downloaded and merge it to your decompiled SytemUI.apk

Done and Recompile


I''ve made for my device Galaxy Wonder (HDPI) http://forum.xda-developers.com/show....php?t=2230063

and Galaxy Nexus http://forum.xda-developers.com/show....php?t=2265104
thanks to Omar1c for testing it :)


CREDIT & THANKS
arco
evanlocked
Omar1c
Galaxy Nexus xda themes forum
Galaxy wonder xda themes forum
XDA
CyanogenMod
ApkMultitools
and all of you , sorry if I missed :)


Viewing all articles
Browse latest Browse all 4090

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>