diff options
author | Nancy Chen <nancychen@google.com> | 2015-08-17 18:26:07 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-08-17 18:26:07 +0000 |
commit | 4e5df6b3a264cceba8774f6704697312b35f329d (patch) | |
tree | f49124c3d7a8461a2cc7cafe1277f166f2b6ba17 /src/com/android/dialer/list/ListsFragment.java | |
parent | cc25f928bbdf2f1714adcd68625fc65034bdfa8d (diff) | |
parent | 44898ad0aa2a12788fc9cfc6b78fa7adc9d90f23 (diff) |
Merge "Convert Dialer activities to AppCompat to support Snackbar."
Diffstat (limited to 'src/com/android/dialer/list/ListsFragment.java')
-rw-r--r-- | src/com/android/dialer/list/ListsFragment.java | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/com/android/dialer/list/ListsFragment.java b/src/com/android/dialer/list/ListsFragment.java index 931b9bd04..feab201f3 100644 --- a/src/com/android/dialer/list/ListsFragment.java +++ b/src/com/android/dialer/list/ListsFragment.java @@ -1,7 +1,21 @@ +/* + * Copyright (C) 2013 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. + */ package com.android.dialer.list; import android.animation.LayoutTransition; -import android.app.ActionBar; import android.app.Fragment; import android.app.FragmentManager; import android.content.Context; @@ -14,6 +28,8 @@ import android.provider.CallLog.Calls; import android.support.v13.app.FragmentPagerAdapter; import android.support.v4.view.ViewPager; import android.support.v4.view.ViewPager.OnPageChangeListener; +import android.support.v7.app.ActionBar; +import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -177,7 +193,7 @@ public class ListsFragment extends Fragment public void onResume() { Trace.beginSection(TAG + " onResume"); super.onResume(); - mActionBar = getActivity().getActionBar(); + mActionBar = ((AppCompatActivity) getActivity()).getSupportActionBar(); if (getUserVisibleHint()) { sendScreenViewForCurrentPosition(); } |