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

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

Merge "Extend the call log highlight to include the call icon."

parents 6ca82f62 73215d67
Loading
Loading
Loading
Loading
+26 −44
Original line number Diff line number Diff line
@@ -32,57 +32,18 @@
        @id/call_log_item gone
    -->

    <RelativeLayout
        android:id="@+id/call_log_item"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="@dimen/call_log_outer_margin"
        android:layout_marginRight="@dimen/call_log_outer_margin"
        android:gravity="center_vertical"
    >
        <LinearLayout
            android:id="@+id/divider"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_alignParentRight="true"
            android:layout_centerVertical="true"
            android:layout_alignTop="@+id/primary_action_view"
            android:layout_alignBottom="@+id/primary_action_view"
            android:orientation="horizontal"
        >
            <View
                android:layout_width="1px"
                android:layout_height="@dimen/call_log_call_action_size"
                android:background="@drawable/ic_divider_dashed_holo_dark"
                android:layout_gravity="center_vertical"
            />
            <ImageButton
                android:id="@+id/secondary_action_icon"
                android:layout_width="@dimen/call_log_call_action_width"
                android:layout_height="match_parent"
                android:paddingLeft="@dimen/call_log_inner_margin"
                android:paddingTop="@dimen/call_log_inner_margin"
                android:paddingBottom="@dimen/call_log_inner_margin"
                android:paddingRight="@dimen/call_log_inner_margin"
                android:scaleType="center"
                android:background="?android:attr/selectableItemBackground"
            />
        </LinearLayout>
        <LinearLayout
            android:id="@+id/primary_action_view"
            android:layout_width="wrap_content"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_toLeftOf="@id/divider"
            android:layout_alignParentLeft="true"
            android:layout_alignWithParentIfMissing="true"
            android:layout_centerVertical="true"
            android:paddingRight="@dimen/call_log_inner_margin"
            android:paddingTop="@dimen/call_log_inner_margin"
            android:paddingBottom="@dimen/call_log_inner_margin"
            android:layout_marginLeft="@dimen/call_log_outer_margin"
            android:layout_marginRight="@dimen/call_log_outer_margin"
            android:orientation="horizontal"
            android:gravity="center_vertical"
            android:background="?android:attr/selectableItemBackground"
            android:focusable="true"
            android:nextFocusRight="@+id/secondary_action_icon"
        >
            <QuickContactBadge
                android:id="@+id/quick_contact_photo"
@@ -94,6 +55,9 @@
            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:paddingTop="@dimen/call_log_inner_margin"
                android:paddingBottom="@dimen/call_log_inner_margin"
                android:orientation="vertical"
                android:gravity="center_vertical"
                android:layout_marginLeft="@dimen/call_log_inner_margin"
@@ -139,8 +103,26 @@
                    />
                </LinearLayout>
            </LinearLayout>
            <View
                android:id="@+id/divider"
                android:layout_width="1px"
                android:layout_height="@dimen/call_log_call_action_size"
                android:background="@drawable/ic_divider_dashed_holo_dark"
                android:layout_gravity="center_vertical"
            />
            <ImageButton
                android:id="@+id/secondary_action_icon"
                android:layout_width="@dimen/call_log_call_action_width"
                android:layout_height="match_parent"
                android:paddingLeft="@dimen/call_log_inner_margin"
                android:paddingTop="@dimen/call_log_inner_margin"
                android:paddingBottom="@dimen/call_log_inner_margin"
                android:paddingRight="@dimen/call_log_inner_margin"
                android:scaleType="center"
                android:background="?android:attr/selectableItemBackground"
                android:nextFocusLeft="@id/primary_action_view"
            />
        </LinearLayout>
    </RelativeLayout>

    <TextView
        android:id="@+id/call_log_header"
+2 −2
Original line number Diff line number Diff line
@@ -538,7 +538,7 @@ public class CallLogAdapter extends GroupingListAdapter
        // This might be a header: check the value of the section column in the cursor.
        if (section == CallLogQuery.SECTION_NEW_HEADER
                || section == CallLogQuery.SECTION_OLD_HEADER) {
            views.listItemView.setVisibility(View.GONE);
            views.primaryActionView.setVisibility(View.GONE);
            views.bottomDivider.setVisibility(View.GONE);
            views.listHeaderTextView.setVisibility(View.VISIBLE);
            views.listHeaderTextView.setText(
@@ -549,7 +549,7 @@ public class CallLogAdapter extends GroupingListAdapter
            return;
        }
        // Default case: an item in the call log.
        views.listItemView.setVisibility(View.VISIBLE);
        views.primaryActionView.setVisibility(View.VISIBLE);
        views.bottomDivider.setVisibility(isLastOfSection(c) ? View.GONE : View.VISIBLE);
        views.listHeaderTextView.setVisibility(View.GONE);

+1 −6
Original line number Diff line number Diff line
@@ -39,8 +39,6 @@ public final class CallLogListItemViews {
    public final View dividerView;
    /** The details of the phone call. */
    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 of a section. */
    public final TextView listHeaderTextView;
    /** The divider to be shown below items. */
@@ -48,14 +46,13 @@ public final class CallLogListItemViews {

    private CallLogListItemViews(QuickContactBadge quickContactView, View primaryActionView,
            ImageView secondaryActionView, View dividerView,
            PhoneCallDetailsViews phoneCallDetailsViews, View listItemView,
            PhoneCallDetailsViews phoneCallDetailsViews,
            TextView listHeaderTextView, View bottomDivider) {
        this.quickContactView = quickContactView;
        this.primaryActionView = primaryActionView;
        this.secondaryActionView = secondaryActionView;
        this.dividerView = dividerView;
        this.phoneCallDetailsViews = phoneCallDetailsViews;
        this.listItemView = listItemView;
        this.listHeaderTextView = listHeaderTextView;
        this.bottomDivider = bottomDivider;
    }
@@ -67,7 +64,6 @@ public final class CallLogListItemViews {
                (ImageView) view.findViewById(R.id.secondary_action_icon),
                view.findViewById(R.id.divider),
                PhoneCallDetailsViews.fromView(view),
                view.findViewById(R.id.call_log_item),
                (TextView) view.findViewById(R.id.call_log_header),
                view.findViewById(R.id.call_log_divider));
    }
@@ -79,7 +75,6 @@ public final class CallLogListItemViews {
                new ImageView(context),
                new View(context),
                PhoneCallDetailsViews.createForTest(context),
                new View(context),
                new TextView(context),
                new View(context));
    }