summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandeep Siddhartha <sansid@google.com>2014-01-03 20:02:19 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-01-03 20:02:19 +0000
commit8d36ffe55285fce9f0485d72a0b3f5dc73b9f5e2 (patch)
tree375dd5807526dd4eef151e644e7c6c9a2e743e0b
parent72b4c7c3df6be428e543c2a28f9b325e0e6d9f2b (diff)
parentd4d3d08741b2c183dbcba1fa25ca100783bfe1ee (diff)
downloadandroid_packages_apps_Trebuchet-8d36ffe55285fce9f0485d72a0b3f5dc73b9f5e2.tar.gz
android_packages_apps_Trebuchet-8d36ffe55285fce9f0485d72a0b3f5dc73b9f5e2.tar.bz2
android_packages_apps_Trebuchet-8d36ffe55285fce9f0485d72a0b3f5dc73b9f5e2.zip
Merge "Allow changing search bar hint in the cling on-the-fly" into jb-ub-now-kermit
-rw-r--r--src/com/android/launcher3/Launcher.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index a8dd99795..802f5d022 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -4418,6 +4418,20 @@ public class Launcher extends Activity
}
}
+ /**
+ * Called when the SearchBar hint should be changed.
+ *
+ * @param hint the hint to be displayed in the search bar.
+ */
+ protected void onSearchBarHintChanged(String hint) {
+ Cling cling = (Cling) findViewById(R.id.first_run_cling);
+ if (cling != null && cling.getVisibility() == View.VISIBLE && !hint.isEmpty()) {
+ TextView sbHint = (TextView) cling.findViewById(R.id.search_bar_hint);
+ sbHint.setText(hint);
+ sbHint.setVisibility(View.VISIBLE);
+ }
+ }
+
protected String getFirstRunClingSearchBarHint() {
return "";
}