How to Center Clock without Gravity Box or Xblast
Requirements
- SystemUI
- Apktool
Screenshot:
Guide:
- Decompile your SystemUI
apktool d SystemUI - go to SystemUI/res/layouts/gemini_status_bar.xml
- Find the line that starts with this then cut:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
or
<com.android.systemui.statusbar.policy.Clock then cut the whole line but only between brackets - Next go to the top of your gemini_status_bar.xml and place your cursor at the end of this line:xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
- Press Enter to create an empty line
- Place cursor at the beginning of that empty space and paste this line:
- <LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent"><com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" /> </LinearLayout> or
- Save the file
- Build your SystemUI
apktool b SystemUI - Sign-in your apk (go to SystemUI/original) copy 2 files then paste it in SystemUI/dist/SystemUI.apk (change it .zip to paste the two file from original folder)
- thats it :)
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">then paste here your clock code then
</LinearLayout>
Comments
Post a Comment