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

Commit 01556529 authored by Isaac Katzenelson's avatar Isaac Katzenelson
Browse files

Remove semi-transparent first name on scrolling

Bug: 5197714 Semi-transparent "first name" effect doesn't go away

Removed the text animation when scrolling. This is not a fix
but a removal of the feature as was decided.

Change-Id: I6b4b7798ec2aea493ca464cffb4907fe21788b6f
parent 4a2341d7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@
    android:orientation="vertical">

    <view
        class="com.android.contacts.list.ContactEntryListView"
        class="com.android.contacts.widget.PinnedHeaderListView"
        android:id="@android:id/list"
        android:layout_width="match_parent"
        android:layout_height="0dip"
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@
    </LinearLayout>

    <view
        class="com.android.contacts.list.ContactEntryListView"
        class="com.android.contacts.widget.PinnedHeaderListView"
        android:id="@android:id/list"
        android:layout_width="match_parent"
        android:layout_height="0dip"
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <view
            class="com.android.contacts.list.ContactEntryListView"
            class="com.android.contacts.widget.PinnedHeaderListView"
            android:id="@android:id/list"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
+0 −16
Original line number Diff line number Diff line
@@ -242,22 +242,6 @@ public abstract class ContactEntryListAdapter extends IndexerListAdapter {
        mSortOrder = sortOrder;
    }

    public void setNameHighlightingEnabled(boolean flag) {
        mNameHighlightingEnabled = flag;
    }

    public boolean isNameHighlightingEnabled() {
        return mNameHighlightingEnabled;
    }

    public void setTextWithHighlightingFactory(TextWithHighlightingFactory factory) {
        mTextWithHighlightingFactory = factory;
    }

    protected TextWithHighlightingFactory getTextWithHighlightingFactory() {
        return mTextWithHighlightingFactory;
    }

    public void setPhotoLoader(ContactPhotoManager photoLoader) {
        mPhotoLoader = photoLoader;
    }
+2 −24
Original line number Diff line number Diff line
@@ -717,11 +717,6 @@ public abstract class ContactEntryListFragment<T extends ContactEntryListAdapter
            changed = true;
        }

        if (mListView instanceof ContactEntryListView) {
            ContactEntryListView listView = (ContactEntryListView)mListView;
            listView.setHighlightNamesWhenScrolling(isNameHighlightingEnabled());
        }

        return changed;
    }

@@ -756,6 +751,8 @@ public abstract class ContactEntryListFragment<T extends ContactEntryListAdapter
                    "'android.R.id.list'");
        }

        mListView.setSelector(getContext().getResources().getDrawable(R.drawable.list_selector));

        View emptyView = mView.findViewById(com.android.internal.R.id.empty);
        if (emptyView != null) {
            mListView.setEmptyView(emptyView);
@@ -810,30 +807,11 @@ public abstract class ContactEntryListFragment<T extends ContactEntryListAdapter
        mAdapter.setPinnedPartitionHeadersEnabled(mSearchMode);
        mAdapter.setContactNameDisplayOrder(mDisplayOrder);
        mAdapter.setSortOrder(mSortOrder);
        mAdapter.setNameHighlightingEnabled(isNameHighlightingEnabled());
        mAdapter.setSectionHeaderDisplayEnabled(mSectionHeaderDisplayEnabled);
        mAdapter.setSelectionVisible(mSelectionVisible);
        mAdapter.setDirectoryResultLimit(mDirectoryResultLimit);
    }

    protected boolean isNameHighlightingEnabled() {
        if (mAdapter.isNameHighlightingEnabled()) {
            return true;
        }

        // When sort order and display order contradict each other, we want to
        // highlight the part of the name used for sorting.
        if (mSortOrder == ContactsContract.Preferences.SORT_ORDER_PRIMARY &&
                mDisplayOrder == ContactsContract.Preferences.DISPLAY_ORDER_ALTERNATIVE) {
            return true;
        } else if (mSortOrder == ContactsContract.Preferences.SORT_ORDER_ALTERNATIVE &&
                mDisplayOrder == ContactsContract.Preferences.DISPLAY_ORDER_PRIMARY) {
            return true;
        } else {
            return false;
        }
    }

    @Override
    public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount,
            int totalItemCount) {
Loading