diff options
author | Michael Kolb <kolby@google.com> | 2012-06-04 16:31:58 -0700 |
---|---|---|
committer | Michael Kolb <kolby@google.com> | 2012-06-04 16:36:41 -0700 |
commit | 0b12912da64ff5b2917d4f50eb91df2e76457d08 (patch) | |
tree | 8b7400e74a8c9f59e6f5db0c62761e03ba5193c9 /src/com/android/browser/NavigationBarPhone.java | |
parent | 9d64d9a8016cc862296b20c4db545018373bdea5 (diff) | |
download | packages_apps_Browser-0b12912da64ff5b2917d4f50eb91df2e76457d08.zip packages_apps_Browser-0b12912da64ff5b2917d4f50eb91df2e76457d08.tar.gz packages_apps_Browser-0b12912da64ff5b2917d4f50eb91df2e76457d08.tar.bz2 |
Enable voice search in omnibox
Bug: 6601348
Bring back voice search. Also fixes focus bug for fixed titlebar.
Change-Id: I83c8ad96957b62c23ad0bbb35685712687d11213
Diffstat (limited to 'src/com/android/browser/NavigationBarPhone.java')
-rw-r--r-- | src/com/android/browser/NavigationBarPhone.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/browser/NavigationBarPhone.java b/src/com/android/browser/NavigationBarPhone.java index 2517d62..c3930d3 100644 --- a/src/com/android/browser/NavigationBarPhone.java +++ b/src/com/android/browser/NavigationBarPhone.java @@ -38,6 +38,7 @@ public class NavigationBarPhone extends NavigationBarBase implements private ImageView mStopButton; private ImageView mMagnify; private ImageView mClearButton; + private ImageView mVoiceButton; private Drawable mStopDrawable; private Drawable mRefreshDrawable; private String mStopDescription; @@ -71,6 +72,8 @@ public class NavigationBarPhone extends NavigationBarBase implements mStopButton.setOnClickListener(this); mClearButton = (ImageView) findViewById(R.id.clear); mClearButton.setOnClickListener(this); + mVoiceButton = (ImageView) findViewById(R.id.voice); + mVoiceButton.setOnClickListener(this); mMagnify = (ImageView) findViewById(R.id.magnify); mTabSwitcher = findViewById(R.id.tab_switcher); mTabSwitcher.setOnClickListener(this); @@ -154,6 +157,8 @@ public class NavigationBarPhone extends NavigationBarBase implements mUrlInput.setText(""); } else if (mComboIcon == v) { mUiController.showPageInfo(); + } else if (mVoiceButton == v) { + mUiController.startVoiceRecognizer(); } else { super.onClick(v); } @@ -215,6 +220,7 @@ public class NavigationBarPhone extends NavigationBarBase implements mComboIcon.setVisibility(View.VISIBLE); mStopButton.setVisibility(View.GONE); mClearButton.setVisibility(View.GONE); + mVoiceButton.setVisibility(View.GONE); mMagnify.setVisibility(View.GONE); mTabSwitcher.setVisibility(View.VISIBLE); mTitleContainer.setBackgroundDrawable(null); @@ -224,6 +230,7 @@ public class NavigationBarPhone extends NavigationBarBase implements mComboIcon.setVisibility(View.GONE); mStopButton.setVisibility(View.VISIBLE); mClearButton.setVisibility(View.GONE); + mVoiceButton.setVisibility(View.VISIBLE); mMagnify.setVisibility(View.GONE); mTabSwitcher.setVisibility(View.GONE); mMore.setVisibility(View.GONE); @@ -233,6 +240,7 @@ public class NavigationBarPhone extends NavigationBarBase implements mComboIcon.setVisibility(View.GONE); mStopButton.setVisibility(View.GONE); mClearButton.setVisibility(View.VISIBLE); + mVoiceButton.setVisibility(View.GONE); mMagnify.setVisibility(View.VISIBLE); mTabSwitcher.setVisibility(View.GONE); mMore.setVisibility(View.GONE); |