Let native widgets fill their slot with no default padding

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TY1LTqiYKXmSUTpLTrJMgF
This commit is contained in:
Claude committed 2026-10-22 06:08:01 +00:00
1 parent 205c7dbed2
commit de8edd6c88
1 file changed
+9
@@ -622,6 +622,15 @@ public class MainActivity extends Activity {
this.id = id; this.id = id;
} }
/**
* No inset: AppWidgetHostView pads older widgets by getDefaultPaddingForWidget
* (about 8dp a side) whenever it binds one, which left a margin inside the slot.
*/
@Override
public void setPadding(int left, int top, int right, int bottom) {
super.setPadding(0, 0, 0, 0);
}
@Override @Override
public boolean onInterceptTouchEvent(MotionEvent e) { public boolean onInterceptTouchEvent(MotionEvent e) {
switch (e.getActionMasked()) { switch (e.getActionMasked()) {