기존 젤리빵님의 추가방법과 제 갤포아에 포팅롬 올려놓은것과 비교하면서 구문을 추가한 방법입니다.
기본적인 추가방법은 유저 포럼의 젤리빵님 추가방법을 참고하시고 아래 코드들과 비교후 적용하시면 됩니다.
이글을 작성하는건 아래 어떤 게시물에서 CRDi님과 다른 한분이 오전/오후 글씨 크기를 작게 표시하고 싶으셔서 물어보셨을때 쪽지로만 알려주신다는 분이 계신거 같아서 그냥 제 갤포아의 구문과 비교해서 적용해보고 아래 스샷처럼 표시가 되길래 간단한 코드라 공유하고자 올리는 글입니다.
오전/오후 글씨를 작게 표시하실 경우
<RelativeLayout android:id="@id/date_timeView" android:background="@drawable/ripple_drawable" android:focusable="false" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="0.0dip"> <com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock" android:gravity="bottom" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="6.0dip" android:singleLine="true" android:layout_marginStart="@dimen/clock_expanded_margin_start" systemui:ampmSmall="true" /> <com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date" android:id="@id/date_collapsed" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/notification_panel_header_date_margin_top" android:singleLine="true" android:layout_marginStart="@dimen/notification_panel_header_date_margin_left" android:layout_toEndOf="@id/clock" /> <com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date" android:id="@id/date_expanded" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/notification_panel_header_date_expanded_margin_top" android:singleLine="true" android:layout_alignParentLeft="true" android:layout_marginStart="@dimen/clock_expanded_margin_start" systemui:datePattern="@string/abbrev_wday_month_day_no_year_alarm" /> </RelativeLayout> |
오전/오후 글씨가 크게 표시하실 경우
<RelativeLayout android:id="@id/date_timeView" android:background="@drawable/ripple_drawable" android:focusable="false" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="0.0dip"> <com.android.systemui.statusbar.policy.DateView android:textSize="0.0dip" android:id="@id/date_collapsed_only_date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/notification_panel_header_date_margin_top_only_date" android:singleLine="true" android:layout_marginStart="@dimen/clock_expanded_margin_start" /> <com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date" android:id="@id/date_collapsed" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/notification_panel_header_date_margin_top" android:singleLine="true" android:layout_marginStart="@dimen/notification_panel_header_date_margin_left" android:layout_toEndOf="@id/clock" /> <com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date" android:id="@id/date_expanded" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/clock_expanded_margin_start" android:layout_marginTop="@dimen/notification_panel_header_date_expanded_margin_top" android:singleLine="true" android:layout_alignParentLeft="true" systemui:datePattern="@string/abbrev_wday_month_day_no_year_alarm" /> <include android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/notification_panel_header_time_margin_top" android:layout_marginStart="@dimen/clock_expanded_margin_start" layout="@layout/split_clock_view" /> </RelativeLayout> |