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

Commit fcb5a03f authored by Andrew Lee's avatar Andrew Lee
Browse files

Remove footer view.

This depends on ListView footer functions, but the Call Log is being
migrated to the RecyclerView. This view will be added back later,
with that work tracked in b/20108202 in scope of M.

Bug: 20108202
Bug: 19372817
Change-Id: I55201e068362083bf5c18ebd08c2e57c97c1b827
parent 64c031c7
Loading
Loading
Loading
Loading
+0 −24
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>

<!--
  ~ Copyright (C) 2014 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License
  -->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="?android:attr/colorControlHighlight">
    <!-- Mask to constrain the ripple to the bounds of the view. -->
    <item android:id="@android:id/mask">
        <color android:color="@android:color/white" />
    </item>
</ripple>
+0 −33
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<!-- Text field and possibly soft menu button above the keypad where
     the digits are displayed. -->

<TextView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/recents_list_footer"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingTop="20dp"
    android:paddingBottom="20dp"
    android:gravity="center"
    android:fontFamily="@string/view_full_call_history_font_family"
    android:textStyle="bold"
    android:textColor="@color/dialtacts_secondary_text_color"
    android:textSize="14sp"
    android:text="@string/recents_footer_text"
    android:background="@drawable/recent_lists_footer_background" />
+0 −46
Original line number Diff line number Diff line
@@ -75,7 +75,6 @@ public class CallLogFragment extends ListFragment
    private static final String KEY_FILTER_TYPE = "filter_type";
    private static final String KEY_LOG_LIMIT = "log_limit";
    private static final String KEY_DATE_LIMIT = "date_limit";
    private static final String KEY_SHOW_FOOTER = "show_footer";

    private CallLogAdapter mAdapter;
    private CallLogQueryHandler mCallLogQueryHandler;
@@ -90,7 +89,6 @@ public class CallLogFragment extends ListFragment
    private TextView mStatusMessageText;
    private TextView mStatusMessageAction;
    private KeyguardManager mKeyguardManager;
    private View mFooterView;

    private boolean mEmptyLoaderRunning;
    private boolean mCallLogFetched;
@@ -128,9 +126,6 @@ public class CallLogFragment extends ListFragment
    // the date filter are included.  If zero, no date-based filtering occurs.
    private long mDateLimit = 0;

    // Whether or not to show the Show call history footer view
    private boolean mHasFooterView = false;

    public CallLogFragment() {
        this(CallLogQueryHandler.CALL_TYPE_ALL, -1);
    }
@@ -174,7 +169,6 @@ public class CallLogFragment extends ListFragment
            mCallTypeFilter = state.getInt(KEY_FILTER_TYPE, mCallTypeFilter);
            mLogLimit = state.getInt(KEY_LOG_LIMIT, mLogLimit);
            mDateLimit = state.getLong(KEY_DATE_LIMIT, mDateLimit);
            mHasFooterView = state.getBoolean(KEY_SHOW_FOOTER, mHasFooterView);
        }

        String currentCountryIso = GeoUtil.getCurrentCountryIso(getActivity());
@@ -287,7 +281,6 @@ public class CallLogFragment extends ListFragment
        super.onViewCreated(view, savedInstanceState);
        mEmptyListView = view.findViewById(R.id.empty_list_view);
        getListView().setItemsCanFocus(true);
        maybeAddFooterView();

        updateEmptyMessage(mCallTypeFilter);
    }
@@ -380,7 +373,6 @@ public class CallLogFragment extends ListFragment
        outState.putInt(KEY_FILTER_TYPE, mCallTypeFilter);
        outState.putInt(KEY_LOG_LIMIT, mLogLimit);
        outState.putLong(KEY_DATE_LIMIT, mDateLimit);
        outState.putBoolean(KEY_SHOW_FOOTER, mHasFooterView);
    }

    @Override
@@ -468,44 +460,6 @@ public class CallLogFragment extends ListFragment
        }
    }

    /**
     * Enables/disables the showing of the view full call history footer
     *
     * @param hasFooterView Whether or not to show the footer
     */
    public void setHasFooterView(boolean hasFooterView) {
        mHasFooterView = hasFooterView;
        maybeAddFooterView();
    }

    /**
     * Determine whether or not the footer view should be added to the listview. If getView()
     * is null, which means onCreateView hasn't been called yet, defer the addition of the footer
     * until onViewCreated has been called.
     */
    private void maybeAddFooterView() {
        if (!mHasFooterView || getView() == null) {
            return;
        }

        if (mFooterView == null) {
            mFooterView = getActivity().getLayoutInflater().inflate(
                    R.layout.recents_list_footer, getListView(), false);
            mFooterView.setOnClickListener(new OnClickListener() {
                @Override
                public void onClick(View v) {
                    ((HostInterface) getActivity()).showCallHistory();
                }
            });
        }

        final ListView listView = getListView();
        listView.removeFooterView(mFooterView);
        listView.addFooterView(mFooterView);

        ViewUtil.addBottomPaddingToListViewForFab(listView, getResources());
    }

    public void onBadDataReported(String number) {
        if (number == null) {
            return;
+0 −1
Original line number Diff line number Diff line
@@ -109,7 +109,6 @@ public class ListsFragment extends Fragment implements ViewPager.OnPageChangeLis
                case TAB_INDEX_RECENTS:
                    mRecentsFragment = new CallLogFragment(CallLogQueryHandler.CALL_TYPE_ALL,
                            MAX_RECENTS_ENTRIES, System.currentTimeMillis() - OLDEST_RECENTS_DATE);
                    mRecentsFragment.setHasFooterView(true);
                    return mRecentsFragment;
                case TAB_INDEX_ALL_CONTACTS:
                    mAllContactsFragment = new AllContactsFragment();