diff options
author | Raj Yengisetty <rajesh@cyngn.com> | 2014-06-09 12:22:19 -0700 |
---|---|---|
committer | Raj Yengisetty <rajesh@cyngn.com> | 2014-06-09 12:22:19 -0700 |
commit | 67f228ab613104a94b06ac322ef68cf167b9c5dc (patch) | |
tree | 613e3223d97b4f0a31ef7ff6e530fdb99f4326f3 | |
parent | 256815a686f55b989242e051e6d3fc8398835bf9 (diff) | |
download | android_packages_apps_Trebuchet-67f228ab613104a94b06ac322ef68cf167b9c5dc.tar.gz android_packages_apps_Trebuchet-67f228ab613104a94b06ac322ef68cf167b9c5dc.tar.bz2 android_packages_apps_Trebuchet-67f228ab613104a94b06ac322ef68cf167b9c5dc.zip |
Include settings check for displaying SearchBar
Repro:
- Open settings panel
- Toggle SearchBar off
- Observe SearchBar is off
- Press Home Button
- Launcher Restarts
- Observe Dynamic Grid doesn't show space for SearchBar but SearchBar is visible!
-rw-r--r-- | src/com/android/launcher3/DeviceProfile.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index 1a0f4c2a4..b09f67edf 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -684,6 +684,22 @@ public class DeviceProfile { } searchBar.setLayoutParams(lp); + // Layout the drop target icons + LinearLayout dropTargetBar = (LinearLayout) launcher.getSearchBar().getDropTargetBar(); + if (hasVerticalBarLayout) { + dropTargetBar.setOrientation(LinearLayout.VERTICAL); + } else { + dropTargetBar.setOrientation(LinearLayout.HORIZONTAL); + } + + // Layout the search bar + View qsbBar = launcher.getQsbBar(); + qsbBar.setVisibility(searchBarVisible ? View.VISIBLE : View.GONE); + LayoutParams vglp = qsbBar.getLayoutParams(); + vglp.width = LayoutParams.MATCH_PARENT; + vglp.height = LayoutParams.MATCH_PARENT; + qsbBar.setLayoutParams(vglp); + // Layout the voice proxy View voiceButtonProxy = launcher.findViewById(R.id.voice_button_proxy); if (voiceButtonProxy != null) { |