summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/allapps
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2018-01-26 13:40:08 -0800
committerSunny Goyal <sunnygoyal@google.com>2018-01-26 13:47:32 -0800
commit7e2e67fd474b75c1a98c3d76939c618519a2fdd3 (patch)
treeba66137ca151f7fb06ffc022cf854872ee83ab96 /src/com/android/launcher3/allapps
parentf5aa2734629fc3302a43105147f442097f3163e7 (diff)
downloadandroid_packages_apps_Trebuchet-7e2e67fd474b75c1a98c3d76939c618519a2fdd3.tar.gz
android_packages_apps_Trebuchet-7e2e67fd474b75c1a98c3d76939c618519a2fdd3.tar.bz2
android_packages_apps_Trebuchet-7e2e67fd474b75c1a98c3d76939c618519a2fdd3.zip
Adding isSeascape method to have a common place to orientation check
Change-Id: Ia61792b29ab0d1d74f76a8dfa53bbf968874dfaa
Diffstat (limited to 'src/com/android/launcher3/allapps')
-rw-r--r--src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java b/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java
index fca3e4780..a56c8b816 100644
--- a/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java
+++ b/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java
@@ -21,7 +21,6 @@ import android.support.animation.FloatValueHolder;
import android.support.animation.SpringAnimation;
import android.support.animation.SpringForce;
import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
import android.text.Selection;
import android.text.Spannable;
import android.text.SpannableString;
@@ -126,8 +125,9 @@ public class AppsSearchContainerLayout extends FrameLayout
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- if (!mLauncher.getDeviceProfile().isVerticalBarLayout()) {
- getLayoutParams().height = mLauncher.getDragLayer().getInsets().top + mMinHeight;
+ DeviceProfile dp = mLauncher.getDeviceProfile();
+ if (!dp.isVerticalBarLayout()) {
+ getLayoutParams().height = dp.getInsets().top + mMinHeight;
}
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
@@ -212,7 +212,7 @@ public class AppsSearchContainerLayout extends FrameLayout
int oldLeft, int oldTop, int oldRight, int oldBottom) {
DeviceProfile dp = mLauncher.getDeviceProfile();
if (!dp.isVerticalBarLayout()) {
- Rect insets = mLauncher.getDragLayer().getInsets();
+ Rect insets = dp.getInsets();
int hotseatBottom = bottom - dp.hotseatBarBottomPaddingPx - insets.bottom;
int searchTopMargin = insets.top + (mMinHeight - mSearchBoxHeight)
+ ((MarginLayoutParams) getLayoutParams()).bottomMargin;