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

Commit 8a854eb9 authored by Flavio Lerda's avatar Flavio Lerda Committed by Android (Google) Code Review
Browse files

Merge "Fixes headers for new and older calls."

parents 6faccb8a be38b67e
Loading
Loading
Loading
Loading
+27 −11
Original line number Diff line number Diff line
@@ -141,17 +141,33 @@
        </LinearLayout>
    </RelativeLayout>

    <LinearLayout
        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"
        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:layout_marginLeft="@dimen/call_log_inner_margin"
        android:layout_marginRight="@dimen/call_log_inner_margin"
        android:textSize="14sp"
            android:paddingLeft="@dimen/call_log_inner_margin"
            android:paddingRight="@dimen/call_log_inner_margin"
            android:singleLine="true"
            android:ellipsize="end"
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:textStyle="bold"
            android:textColor="?attr/call_log_header_color"
        android:padding="@dimen/call_log_inner_margin"
            android:textAllCaps="true"
            android:focusable="true"
        android:drawableBottom="@android:color/holo_blue_light"
        />
        <View
            android:layout_width="match_parent"
            android:layout_height="2dip"
            android:background="@color/call_log_voicemail_highlight_color"/>
    </LinearLayout>
</view>
+2 −2
Original line number Diff line number Diff line
@@ -701,7 +701,7 @@ public class CallLogFragment extends ListFragment implements ViewPagerVisibility
            if (section == CallLogQuery.SECTION_NEW_HEADER
                    || section == CallLogQuery.SECTION_OLD_HEADER) {
                views.listItemView.setVisibility(View.GONE);
                views.listHeaderTextView.setVisibility(View.VISIBLE);
                views.listHeaderView.setVisibility(View.VISIBLE);
                views.listHeaderTextView.setText(
                        section == CallLogQuery.SECTION_NEW_HEADER
                                ? R.string.call_log_new_header
@@ -711,7 +711,7 @@ public class CallLogFragment extends ListFragment implements ViewPagerVisibility
            }
            // Default case: an item in the call log.
            views.listItemView.setVisibility(View.VISIBLE);
            views.listHeaderTextView.setVisibility(View.GONE);
            views.listHeaderView.setVisibility(View.GONE);

            final String number = c.getString(CallLogQuery.NUMBER);
            final long date = c.getLong(CallLogQuery.DATE);
+7 −2
Original line number Diff line number Diff line
@@ -43,13 +43,15 @@ 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 text of the header in a stand-alone row, or null for other types of rows. */
    /** The header of a section. */
    public final View listHeaderView;
    /** The text of the header of a section. */
    public final TextView listHeaderTextView;

    private CallLogListItemViews(QuickContactBadge quickContactView, View primaryActionView,
            ImageView secondaryActionView, View unheardView, View dividerView,
            PhoneCallDetailsViews phoneCallDetailsViews, View listItemView,
            TextView listHeaderTextView) {
            View listHeaderView, TextView listHeaderTextView) {
        this.quickContactView = quickContactView;
        this.primaryActionView = primaryActionView;
        this.secondaryActionView = secondaryActionView;
@@ -57,6 +59,7 @@ public final class CallLogListItemViews {
        this.dividerView = dividerView;
        this.phoneCallDetailsViews = phoneCallDetailsViews;
        this.listItemView = listItemView;
        this.listHeaderView = listHeaderView;
        this.listHeaderTextView = listHeaderTextView;
    }

@@ -69,6 +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));
    }

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