Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f66d9f35 authored by Flavio Lerda's avatar Flavio Lerda
Browse files

Pixel perfect work on call log.

- Divider color updated based on feedback from designer.
- Updated header to use new platform level style.

Bug: 5258258
Change-Id: I6152329d8c0f50d644082d3a2dc1cb4c0472ba60
parent bf4582be
Loading
Loading
Loading
Loading
+16 −29
Original line number Diff line number Diff line
@@ -142,42 +142,29 @@
        </LinearLayout>
    </RelativeLayout>

    <LinearLayout
    <TextView
        android:id="@+id/call_log_header"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingLeft="@dimen/call_log_outer_margin"
        android:paddingRight="@dimen/call_log_outer_margin"
        style="?android:attr/listSeparatorTextViewStyle"
        android:layout_marginLeft="@dimen/call_log_outer_margin"
        android:layout_marginRight="@dimen/call_log_outer_margin"
        android:paddingTop="@dimen/call_log_inner_margin"
        android:paddingBottom="@dimen/call_log_inner_margin"
        android:orientation="vertical">

        <TextView
            android:id="@+id/call_log_header_text"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingLeft="@dimen/call_log_inner_margin"
            android:paddingRight="@dimen/call_log_inner_margin"
            android:singleLine="true"
            android:ellipsize="end"
        android:background="@drawable/list_section_divider_holo_custom"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:textStyle="bold"
        android:textColor="?attr/call_log_header_color"
        android:textAllCaps="true"
        android:singleLine="true"
        android:ellipsize="end"
        android:focusable="true"
    />
        <View
            android:layout_width="match_parent"
            android:layout_height="2dip"
            android:background="@color/call_log_voicemail_highlight_color"/>
    </LinearLayout>

    <View
        android:id="@+id/call_log_divider"
        android:layout_width="match_parent"
        android:layout_height="1px"
        android:layout_marginLeft="16dip"
        android:layout_marginRight="16dip"
        android:background="#1a1a1a"
        android:layout_marginLeft="@dimen/call_log_outer_margin"
        android:layout_marginRight="@dimen/call_log_outer_margin"
        android:background="#55ffffff"
    />
</view>
+2 −2
Original line number Diff line number Diff line
@@ -542,7 +542,7 @@ public class CallLogAdapter extends GroupingListAdapter
                || section == CallLogQuery.SECTION_OLD_HEADER) {
            views.listItemView.setVisibility(View.GONE);
            views.bottomDivider.setVisibility(View.GONE);
            views.listHeaderView.setVisibility(View.VISIBLE);
            views.listHeaderTextView.setVisibility(View.VISIBLE);
            views.listHeaderTextView.setText(
                    section == CallLogQuery.SECTION_NEW_HEADER
                            ? R.string.call_log_new_header
@@ -553,7 +553,7 @@ public class CallLogAdapter extends GroupingListAdapter
        // Default case: an item in the call log.
        views.listItemView.setVisibility(View.VISIBLE);
        views.bottomDivider.setVisibility(isLastOfSection(c) ? View.GONE : View.VISIBLE);
        views.listHeaderView.setVisibility(View.GONE);
        views.listHeaderTextView.setVisibility(View.GONE);

        final String number = c.getString(CallLogQuery.NUMBER);
        final long date = c.getLong(CallLogQuery.DATE);
+2 −7
Original line number Diff line number Diff line
@@ -43,8 +43,6 @@ public final class CallLogListItemViews {
    public final PhoneCallDetailsViews phoneCallDetailsViews;
    /** The item view for a stand-alone row, or null for other types of rows. */
    public final View listItemView;
    /** The header of a section. */
    public final View listHeaderView;
    /** The text of the header of a section. */
    public final TextView listHeaderTextView;
    /** The divider to be shown below items. */
@@ -53,7 +51,7 @@ public final class CallLogListItemViews {
    private CallLogListItemViews(QuickContactBadge quickContactView, View primaryActionView,
            ImageView secondaryActionView, View unheardView, View dividerView,
            PhoneCallDetailsViews phoneCallDetailsViews, View listItemView,
            View listHeaderView, TextView listHeaderTextView, View bottomDivider) {
            TextView listHeaderTextView, View bottomDivider) {
        this.quickContactView = quickContactView;
        this.primaryActionView = primaryActionView;
        this.secondaryActionView = secondaryActionView;
@@ -61,7 +59,6 @@ public final class CallLogListItemViews {
        this.dividerView = dividerView;
        this.phoneCallDetailsViews = phoneCallDetailsViews;
        this.listItemView = listItemView;
        this.listHeaderView = listHeaderView;
        this.listHeaderTextView = listHeaderTextView;
        this.bottomDivider = bottomDivider;
    }
@@ -75,8 +72,7 @@ public final class CallLogListItemViews {
                view.findViewById(R.id.divider),
                PhoneCallDetailsViews.fromView(view),
                view.findViewById(R.id.call_log_item),
                view.findViewById(R.id.call_log_header),
                (TextView) view.findViewById(R.id.call_log_header_text),
                (TextView) view.findViewById(R.id.call_log_header),
                view.findViewById(R.id.call_log_divider));
    }

@@ -89,7 +85,6 @@ public final class CallLogListItemViews {
                new View(context),
                PhoneCallDetailsViews.createForTest(context),
                new View(context),
                new View(context),
                new TextView(context),
                new View(context));
    }