summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorTakazumi Matsumoto <tdr@taksmon.com>2012-01-15 06:29:43 +0000
committernebkat <nebkat@teamhacksung.org>2012-01-15 12:03:31 +0000
commitb16eb6fcb2a8153553e84c8f35e9e738cc4c332b (patch)
tree1e941506e7efc182f929c4949b53659b08b8d7fc /src/com
parente9dc632632e1675fc6b741b4bc9f2550528eac3c (diff)
downloadandroid_packages_apps_Trebuchet-b16eb6fcb2a8153553e84c8f35e9e738cc4c332b.tar.gz
android_packages_apps_Trebuchet-b16eb6fcb2a8153553e84c8f35e9e738cc4c332b.tar.bz2
android_packages_apps_Trebuchet-b16eb6fcb2a8153553e84c8f35e9e738cc4c332b.zip
SearchDropTargetBar: Fix search bar hiding on tablets
This fixes a possible NPE and also changes the layout to move the app drawer icon outside the search bar (to allow tablet users to hide the search bar without removing the allapps icon). Change-Id: I4bdee4f0d3384bbc769b12c3a6abfa0beb30e1b0
Diffstat (limited to 'src/com')
-rw-r--r--src/com/cyanogenmod/trebuchet/Launcher.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/com/cyanogenmod/trebuchet/Launcher.java b/src/com/cyanogenmod/trebuchet/Launcher.java
index 3e758d414..c46f2e869 100644
--- a/src/com/cyanogenmod/trebuchet/Launcher.java
+++ b/src/com/cyanogenmod/trebuchet/Launcher.java
@@ -795,13 +795,15 @@ public final class Launcher extends Activity
// Get the search/delete bar
mSearchDropTargetBar = (SearchDropTargetBar) mDragLayer.findViewById(R.id.qsb_bar);
+ final View qsbDivider = findViewById(R.id.qsb_divider);
+ final View dockDivider = findViewById(R.id.dock_divider);
// Hide the search divider if we are hiding search bar
- if (!mShowSearchBar && getCurrentOrientation() == Configuration.ORIENTATION_LANDSCAPE) {
- ((View) findViewById(R.id.qsb_divider)).setVisibility(View.GONE);
+ if (!mShowSearchBar && qsbDivider != null) {
+ qsbDivider.setVisibility(View.GONE);
}
- if (!mShowDockDivider) {
- ((View) findViewById(R.id.dock_divider)).setVisibility(View.GONE);
+ if (!mShowDockDivider && dockDivider != null) {
+ dockDivider.setVisibility(View.GONE);
}
// Setup AppsCustomize