diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-02-24 12:05:27 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-02-24 12:05:27 +0000 |
commit | a39e732c6326f6265a213024bbb6899aea04f10a (patch) | |
tree | 1f33e4d0d1dc86364554138b23edb06d1bc7a9b0 /java/com/android/dialer/main/impl/toolbar/MainToolbar.java | |
parent | 3002ad660a95b79a07837d283d1162df727b3221 (diff) | |
parent | ebc59e20e21e78e479fd3fb42993851c10d63b75 (diff) |
Merge "Fixed a few bugs in NUI Main Activity."
Diffstat (limited to 'java/com/android/dialer/main/impl/toolbar/MainToolbar.java')
-rw-r--r-- | java/com/android/dialer/main/impl/toolbar/MainToolbar.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/java/com/android/dialer/main/impl/toolbar/MainToolbar.java b/java/com/android/dialer/main/impl/toolbar/MainToolbar.java index a129fca8b..fc4bd0312 100644 --- a/java/com/android/dialer/main/impl/toolbar/MainToolbar.java +++ b/java/com/android/dialer/main/impl/toolbar/MainToolbar.java @@ -20,19 +20,20 @@ import android.animation.ValueAnimator; import android.animation.ValueAnimator.AnimatorUpdateListener; import android.content.Context; import android.support.annotation.StringRes; -import android.support.v7.widget.PopupMenu.OnMenuItemClickListener; +import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.util.AttributeSet; import android.view.MenuItem; import android.view.animation.AccelerateDecelerateInterpolator; import android.widget.ImageButton; +import android.widget.PopupMenu; import android.widget.RelativeLayout; import com.android.dialer.common.Assert; import com.android.dialer.util.ViewUtil; import com.google.common.base.Optional; /** Toolbar for {@link com.android.dialer.main.impl.MainActivity}. */ -public final class MainToolbar extends Toolbar implements OnMenuItemClickListener { +public final class MainToolbar extends Toolbar implements PopupMenu.OnMenuItemClickListener { private static final int SLIDE_DURATION = 300; private static final AccelerateDecelerateInterpolator SLIDE_INTERPOLATOR = @@ -155,4 +156,12 @@ public final class MainToolbar extends Toolbar implements OnMenuItemClickListene public void setHint(@StringRes int hint) { searchBar.setHint(hint); } + + public void showClearFrequents(boolean show) { + overflowMenu.showClearFrequents(show); + } + + public void maybeShowSimulator(AppCompatActivity appCompatActivity) { + overflowMenu.maybeShowSimulator(appCompatActivity); + } } |