Preventing padding from getting reset when the widget updates

Bug: 112854572
Change-Id: Ia2963310997ca13f2e1f18f7268b0b9b54a53590
This commit is contained in:
Sunny Goyal
2018-08-22 14:23:35 -07:00
parent f2b97f8cd8
commit 4cbbaedb2c
2 changed files with 5 additions and 1 deletions

View File

@@ -162,7 +162,6 @@ public class QsbContainerView extends FrameLayout {
.getAppWidgetOptions(widgetId), opts)) {
mQsb.updateAppWidgetOptions(opts);
}
mQsb.setPadding(0, 0, 0, 0);
mQsbWidgetHost.startListening();
return mQsb;
}

View File

@@ -52,6 +52,11 @@ public class QsbWidgetHostView extends AppWidgetHostView {
return mPreviousOrientation != orientation;
}
@Override
public void setPadding(int left, int top, int right, int bottom) {
// Prevent the base class from applying the default widget padding.
super.setPadding(0, 0, 0, 0);
}
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {