summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaj Yengisetty <raj@cyngn.com>2015-09-30 15:56:24 (GMT)
committerDanesh M <daneshm90@gmail.com>2015-09-30 16:35:17 (GMT)
commit1f9ba38cec29ae3dfcb3c3592389676c0f1a87ab (patch)
treefa6518f24a76069a9925f74f4d996c3b54b50d42
parentaf15b41e59de7600aacd86f122941617f23502db (diff)
downloadandroid_packages_apps_Trebuchet-1f9ba38cec29ae3dfcb3c3592389676c0f1a87ab.zip
android_packages_apps_Trebuchet-1f9ba38cec29ae3dfcb3c3592389676c0f1a87ab.tar.gz
android_packages_apps_Trebuchet-1f9ba38cec29ae3dfcb3c3592389676c0f1a87ab.tar.bz2
App Drawer: fix insets on paddingTop
Repro: - Use vertical app drawer - Hold scrubber and move to the top of the app list - Observe: white space above the first element in the list view Change-Id: If14b1e9668c88a42e1069e8096ddc04861397d07
-rw-r--r--src/com/android/launcher3/AppDrawerContainer.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/launcher3/AppDrawerContainer.java b/src/com/android/launcher3/AppDrawerContainer.java
index f67bd9a..e87c6b8 100644
--- a/src/com/android/launcher3/AppDrawerContainer.java
+++ b/src/com/android/launcher3/AppDrawerContainer.java
@@ -8,8 +8,12 @@ import android.widget.FrameLayout;
import android.widget.LinearLayout;
public class AppDrawerContainer extends InsettableFrameLayout {
+
+ private int mScrubberHeight;
+
public AppDrawerContainer(Context context, AttributeSet attrs) {
super(context, attrs);
+ mScrubberHeight = getResources().getDimensionPixelSize(R.dimen.scrubber_height);
}
@Override
@@ -18,8 +22,8 @@ public class AppDrawerContainer extends InsettableFrameLayout {
View view = findViewById(R.id.app_drawer_recyclerview);
FrameLayout.LayoutParams lp =
(FrameLayout.LayoutParams) view.getLayoutParams();
- int paddingBottom = view.getPaddingBottom() + insets.bottom - mInsets.bottom;
- int paddingTop = view.getPaddingTop() + insets.top - mInsets.top;
+ int paddingBottom = mScrubberHeight + insets.bottom - mInsets.bottom;
+ int paddingTop = insets.top - mInsets.top;
view.setLayoutParams(lp);
view.setPadding(view.getPaddingLeft(), paddingTop, view.getPaddingRight(), paddingBottom);