테마강좌/GalaxyS2

상단바 시계 색상 바꾸기

알 수 없는 사용자 2012. 12. 17. 23:08

지난번 중앙 시계에 이어서 이번엔 상단바 시계 색상 바꾸기 입니다.

 

제가 쓰는 강좌는 Galaxy S2 기준입니다.

다른 기종의 폰은 강좌랑 다를수 있으니 참고만 하시길 바랍니다.

 

이번에도 apk manager 사용법과 컴파일/디컴파일 하는 방법은 생략합니다.

 

ICS 올라간 갤투의 상단바 시계 색상 바꾸는 방법은 두가지 입니다.

첫째로 /res/layout/tw_status_bar.xml 에서 시계색상 구문에 색코드를 추가하는 방법과

둘째로 /res/values/styles.xml에서 바꾸는 방법이 있습니다.

 

우선 첫번째 방법인 레이아웃에 색코드 추가하는 방법부터 설명 드립니다.

 

          <com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
   

   위 구문이 갤투의 상단바 시계를 표시하는 구문입니다. 위 구문에

 

 <com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textcolor="#ffffffff" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />

   파란색 굵은 글씨 부분을 넣어 주시면 됩니다.

   색상코드는 원하시는 색상코드를 찾아서 넣어주시면 됩니다.

   참고로 앞에 ff두개는 투명도이고 뒤의 ffffff부분이 색코드입니다.

 

 

 

 

두번째 방법인 styles.xml에서 바꾸는 방법입니다.

참고로 저는 이 방법으로 상단바 시계 색상을 바꿉니다.

 

/res/values/styles.xml 파일을 보시면

 

<style name="TextAppearance.StatusBar.Clock" parent="@android:style/TextAppearance.StatusBar.Icon">
        <item name="android:textSize">16.0dip</item>
        <item name="android:textStyle">normal</item>
        <item name="android:textColor">#ffc4eaf4</item>

</style>

 

위의 구문이 있습니다. 보시면 짐작 가시겠지만 아래줄의 컬러코드를 원하는 컬러코드로 바꿔주시면 됩니다.

 

참고로 위 구문 아래 구문은

 

<style name="TextAppearance.StatusBar.Date" parent="@android:style/TextAppearance.StatusBar.Icon">
        <item name="android:textSize">11.0sp</item>
        <item name="android:textStyle">normal</item>

</style>

 

이런 구문이 있는데 이 구문은 퀵패널의 날짜를 나타내는 부분입니다.

여기에도 색상코드의 아래줄을 복사하셔서 젤 아래에 붙여넣어 주시면 날짜 색상도 바꿀수 있습니다.

 

<style name="TextAppearance.StatusBar.Date" parent="@android:style/TextAppearance.StatusBar.Icon">
        <item name="android:textSize">11.0sp</item>
        <item name="android:textStyle">normal</item>
        <item name="android:textColor">#fff4eaf4</item>
</style>

 

이렇게 바꿔주시면 됩니다.^^