Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,768,557 Members 53,284 Now Online
XDA Developers Android and Mobile Development Forum

[MOD][ICS] Z2 style Z1 SystemUI.apk (12/03/14)

Tip us?
 
Aciong.Aksaya
Old
#21  
Aciong.Aksaya's Avatar
Senior Member
Thanks Meter 161
Posts: 449
Join Date: Aug 2012
Location: Mandaluyong
How did you manage to put the clock inside the battery icon?

If you think my post was helpful, please click the thanks button
 
DBRoger
Old
#22  
DBRoger's Avatar
Member - OP
Thanks Meter 54
Posts: 79
Join Date: Mar 2013
Location: Taipei
Quote:
Originally Posted by Aciong.Aksaya View Post
How did you manage to put the clock inside the battery icon?
Sorry for late reply. I wasn't putting clock text inside the battery icon. If you are asking how to put battery text inside battery icon, this is solution:
I use "FrameLayout" to make battery icon under battery text. Don't ask me why use this or how to use this. I am not expert. I just google android layout and find this solution.

Part of original SystemUI layout from DdcCabuslay. (res\layout\status_bar.xml)
Code:
<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" />
            <TextView android:layout_gravity="left|center" android:id="@id/battery_text" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" style="@style/StatusBarNotificationText" />
            <ImageView android:id="@id/battery" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
        </LinearLayout>
After modification.
Code:
<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" />
            <FrameLayout android:layout_gravity="right|center" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
                <ImageView android:layout_gravity="right|center" android:id="@id/battery" android:layout_width="wrap_content" android:layout_height="wrap_content" />
                <TextView android:textSize="9.0dip" android:textStyle="bold" android:layout_gravity="right|center" android:id="@id/battery_text" android:paddingRight="12.5dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" style="@style/StatusBarNotificationText" />
            </FrameLayout>
        </LinearLayout>
I am a noobiest noob who never learns about java programming or other computer language.
I just spend many time dealing problems and finding solutions.
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes