Offset 1, 12 lines modifiedOffset 1, 12 lines modified
  
1 package·androidx.appcompat.widget;1 package·androidx.appcompat.widget;
  
2 import·androidx.appcompat.view.menu.BaseMenuPresenter;2 import·androidx.appcompat.view.menu.BaseMenuPresenter;
3 import·android.widget.LinearLayout$LayoutParams;3 import·android.view.ViewGroup$MarginLayoutParams;
4 import·android.view.ContextThemeWrapper;4 import·android.view.ContextThemeWrapper;
5 import·android.content.res.Configuration;5 import·android.content.res.Configuration;
6 import·android.view.MenuItem;6 import·android.view.MenuItem;
7 import·androidx.appcompat.view.menu.MenuItemImpl;7 import·androidx.appcompat.view.menu.MenuItemImpl;
8 import·androidx.appcompat.view.menu.MenuPresenter;8 import·androidx.appcompat.view.menu.MenuPresenter;
9 import·android.view.Menu;9 import·android.view.Menu;
10 import·android.view.accessibility.AccessibilityEvent;10 import·android.view.accessibility.AccessibilityEvent;
Offset 146, 16 lines modifiedOffset 146, 16 lines modified
146 ····················n13·=·n12;146 ····················n13·=·n12;
147 ················}147 ················}
148 ················final·ActionMenuView$LayoutParams·actionMenuView$LayoutParams·=·(ActionMenuView$LayoutParams)child.getLayoutParams();148 ················final·ActionMenuView$LayoutParams·actionMenuView$LayoutParams·=·(ActionMenuView$LayoutParams)child.getLayoutParams();
149 ················actionMenuView$LayoutParams.expanded·=·false;149 ················actionMenuView$LayoutParams.expanded·=·false;
150 ················actionMenuView$LayoutParams.extraPixels·=·0;150 ················actionMenuView$LayoutParams.extraPixels·=·0;
151 ················actionMenuView$LayoutParams.cellsUsed·=·0;151 ················actionMenuView$LayoutParams.cellsUsed·=·0;
152 ················actionMenuView$LayoutParams.expandable·=·false;152 ················actionMenuView$LayoutParams.expandable·=·false;
153 ················((LinearLayout$LayoutParams)actionMenuView$LayoutParams).leftMargin·=·0;153 ················((ViewGroup$MarginLayoutParams)actionMenuView$LayoutParams).leftMargin·=·0;
154 ················((LinearLayout$LayoutParams)actionMenuView$LayoutParams).rightMargin·=·0;154 ················((ViewGroup$MarginLayoutParams)actionMenuView$LayoutParams).rightMargin·=·0;
155 ················actionMenuView$LayoutParams.preventEdgeOffset·=·(b2·&&·((ActionMenuItemView)child).hasText());155 ················actionMenuView$LayoutParams.preventEdgeOffset·=·(b2·&&·((ActionMenuItemView)child).hasText());
156 ················int·n14;156 ················int·n14;
157 ················if·(actionMenuView$LayoutParams.isOverflowButton)·{157 ················if·(actionMenuView$LayoutParams.isOverflowButton)·{
158 ····················n14·=·1;158 ····················n14·=·1;
159 ················}159 ················}
160 ················else·{160 ················else·{
161 ····················n14·=·n6;161 ····················n14·=·n6;
Offset 267, 33 lines modifiedOffset 267, 33 lines modified
267 ····························if·((j·&·1·<<·l)·!=·0x0L)·{267 ····························if·((j·&·1·<<·l)·!=·0x0L)·{
268 ································final·View·child2·=·((ViewGroup)this).getChildAt(l);268 ································final·View·child2·=·((ViewGroup)this).getChildAt(l);
269 ································final·ActionMenuView$LayoutParams·actionMenuView$LayoutParams3·=·(ActionMenuView$LayoutParams)child2.getLayoutParams();269 ································final·ActionMenuView$LayoutParams·actionMenuView$LayoutParams3·=·(ActionMenuView$LayoutParams)child2.getLayoutParams();
270 ································if·(child2·instanceof·ActionMenuItemView)·{270 ································if·(child2·instanceof·ActionMenuItemView)·{
271 ····································actionMenuView$LayoutParams3.extraPixels·=·n40;271 ····································actionMenuView$LayoutParams3.extraPixels·=·n40;
272 ····································actionMenuView$LayoutParams3.expanded·=·true;272 ····································actionMenuView$LayoutParams3.expanded·=·true;
273 ····································if·(l·==·0·&&·!actionMenuView$LayoutParams3.preventEdgeOffset)·{273 ····································if·(l·==·0·&&·!actionMenuView$LayoutParams3.preventEdgeOffset)·{
274 ········································((LinearLayout$LayoutParams)actionMenuView$LayoutParams3).leftMargin·=·-n40·/·2;274 ········································((ViewGroup$MarginLayoutParams)actionMenuView$LayoutParams3).leftMargin·=·-n40·/·2;
275 ····································}275 ····································}
276 ····································n41·=·1;276 ····································n41·=·1;
277 ································}277 ································}
278 ································else·{278 ································else·{
279 ····································final·int·n42·=·2;279 ····································final·int·n42·=·2;
280 ····································if·(actionMenuView$LayoutParams3.isOverflowButton)·{280 ····································if·(actionMenuView$LayoutParams3.isOverflowButton)·{
281 ········································actionMenuView$LayoutParams3.extraPixels·=·n40;281 ········································actionMenuView$LayoutParams3.extraPixels·=·n40;
282 ········································final·boolean·expanded·=·true;282 ········································final·boolean·expanded·=·true;
283 ········································actionMenuView$LayoutParams3.expanded·=·expanded;283 ········································actionMenuView$LayoutParams3.expanded·=·expanded;
284 ········································((LinearLayout$LayoutParams)actionMenuView$LayoutParams3).rightMargin·=·-n40·/·n42;284 ········································((ViewGroup$MarginLayoutParams)actionMenuView$LayoutParams3).rightMargin·=·-n40·/·n42;
285 ········································n41·=·(expanded·?·1·:·0);285 ········································n41·=·(expanded·?·1·:·0);
286 ····································}286 ····································}
287 ····································else·{287 ····································else·{
288 ········································if·(l·!=·0)·{288 ········································if·(l·!=·0)·{
289 ············································((LinearLayout$LayoutParams)actionMenuView$LayoutParams3).leftMargin·=·n40·/·2;289 ············································((ViewGroup$MarginLayoutParams)actionMenuView$LayoutParams3).leftMargin·=·n40·/·2;
290 ········································}290 ········································}
291 ········································if·(l·!=·childCount·-·1)·{291 ········································if·(l·!=·childCount·-·1)·{
292 ············································((LinearLayout$LayoutParams)actionMenuView$LayoutParams3).rightMargin·=·n40·/·2;292 ············································((ViewGroup$MarginLayoutParams)actionMenuView$LayoutParams3).rightMargin·=·n40·/·2;
293 ········································}293 ········································}
294 ····································}294 ····································}
295 ································}295 ································}
296 ····························}296 ····························}
297 ····························++l;297 ····························++l;
298 ························}298 ························}
299 ····················}299 ····················}
Offset 384, 15 lines modifiedOffset 384, 15 lines modified
384 ····public·boolean·dispatchPopulateAccessibilityEvent(final·AccessibilityEvent·accessibilityEvent)·{384 ····public·boolean·dispatchPopulateAccessibilityEvent(final·AccessibilityEvent·accessibilityEvent)·{
385 ········return·false;385 ········return·false;
386 ····}386 ····}
387 ····387 ····
388 ····protected·ActionMenuView$LayoutParams·generateDefaultLayoutParams()·{388 ····protected·ActionMenuView$LayoutParams·generateDefaultLayoutParams()·{
389 ········final·int·n·=·-2;389 ········final·int·n·=·-2;
390 ········final·ActionMenuView$LayoutParams·actionMenuView$LayoutParams·=·new·ActionMenuView$LayoutParams(n,·n);390 ········final·ActionMenuView$LayoutParams·actionMenuView$LayoutParams·=·new·ActionMenuView$LayoutParams(n,·n);
391 ········((LinearLayout$LayoutParams)actionMenuView$LayoutParams).gravity·=·16;391 ········((LinearLayoutCompat$LayoutParams)actionMenuView$LayoutParams).gravity·=·16;
392 ········return·actionMenuView$LayoutParams;392 ········return·actionMenuView$LayoutParams;
393 ····}393 ····}
394 ····394 ····
395 ····public·ActionMenuView$LayoutParams·generateLayoutParams(final·AttributeSet·set)·{395 ····public·ActionMenuView$LayoutParams·generateLayoutParams(final·AttributeSet·set)·{
396 ········return·new·ActionMenuView$LayoutParams(((ViewGroup)this).getContext(),·set);396 ········return·new·ActionMenuView$LayoutParams(((ViewGroup)this).getContext(),·set);
397 ····}397 ····}
398 ····398 ····
Offset 401, 16 lines modifiedOffset 401, 16 lines modified
401 ············ActionMenuView$LayoutParams·actionMenuView$LayoutParams;401 ············ActionMenuView$LayoutParams·actionMenuView$LayoutParams;
402 ············if·(viewGroup$LayoutParams·instanceof·ActionMenuView$LayoutParams)·{402 ············if·(viewGroup$LayoutParams·instanceof·ActionMenuView$LayoutParams)·{
403 ················actionMenuView$LayoutParams·=·new·ActionMenuView$LayoutParams((ActionMenuView$LayoutParams)viewGroup$LayoutParams);403 ················actionMenuView$LayoutParams·=·new·ActionMenuView$LayoutParams((ActionMenuView$LayoutParams)viewGroup$LayoutParams);
404 ············}404 ············}
405 ············else·{405 ············else·{
406 ················actionMenuView$LayoutParams·=·new·ActionMenuView$LayoutParams(viewGroup$LayoutParams);406 ················actionMenuView$LayoutParams·=·new·ActionMenuView$LayoutParams(viewGroup$LayoutParams);
407 ············}407 ············}
408 ············if·(((LinearLayout$LayoutParams)actionMenuView$LayoutParams).gravity·<=·0)·{408 ············if·(((LinearLayoutCompat$LayoutParams)actionMenuView$LayoutParams).gravity·<=·0)·{
409 ················((LinearLayout$LayoutParams)actionMenuView$LayoutParams).gravity·=·16;409 ················((LinearLayoutCompat$LayoutParams)actionMenuView$LayoutParams).gravity·=·16;
410 ············}410 ············}
411 ············return·actionMenuView$LayoutParams;411 ············return·actionMenuView$LayoutParams;
412 ········}412 ········}
413 ········return·this.generateDefaultLayoutParams();413 ········return·this.generateDefaultLayoutParams();
414 ····}414 ····}
415 ····415 ····
416 ····public·ActionMenuView$LayoutParams·generateOverflowButtonLayoutParams()·{416 ····public·ActionMenuView$LayoutParams·generateOverflowButtonLayoutParams()·{
Offset 526, 28 lines modifiedOffset 526, 28 lines modified
526 ····················if·(this.hasSupportDividerBeforeChildAt(n8))·{526 ····················if·(this.hasSupportDividerBeforeChildAt(n8))·{
527 ························measuredWidth·+=·dividerWidth;527 ························measuredWidth·+=·dividerWidth;
528 ····················}528 ····················}
529 ····················final·int·measuredHeight·=·child.getMeasuredHeight();529 ····················final·int·measuredHeight·=·child.getMeasuredHeight();
530 ····················int·n11;530 ····················int·n11;
531 ····················int·n12;531 ····················int·n12;
532 ····················if·(layoutRtl)·{532 ····················if·(layoutRtl)·{
533 ························n11·=·((ViewGroup)this).getPaddingLeft()·+·((LinearLayout$LayoutParams)actionMenuView$LayoutParams).leftMargin;533 ························n11·=·((ViewGroup)this).getPaddingLeft()·+·((ViewGroup$MarginLayoutParams)actionMenuView$LayoutParams).leftMargin;
534 ························n12·=·n11·+·measuredWidth;534 ························n12·=·n11·+·measuredWidth;
535 ····················}535 ····················}
536 ····················else·{536 ····················else·{
537 ························n12·=·((ViewGroup)this).getWidth()·-·((ViewGroup)this).getPaddingRight()·-·((LinearLayout$LayoutParams)actionMenuView$LayoutParams).rightMargin;537 ························n12·=·((ViewGroup)this).getWidth()·-·((ViewGroup)this).getPaddingRight()·-·((ViewGroup$MarginLayoutParams)actionMenuView$LayoutParams).rightMargin;
538 ························n11·=·n12·-·measuredWidth;538 ························n11·=·n12·-·measuredWidth;
539 ····················}539 ····················}
540 ····················final·int·n13·=·n5·-·measuredHeight·/·2;540 ····················final·int·n13·=·n5·-·measuredHeight·/·2;
541 ····················child.layout(n11,·n13,·n12,·measuredHeight·+·n13);541 ····················child.layout(n11,·n13,·n12,·measuredHeight·+·n13);
542 ····················n7·-=·measuredWidth;542 ····················n7·-=·measuredWidth;
543 ····················b2·=·b3;543 ····················b2·=·b3;
544 ················}544 ················}
545 ················else·{545 ················else·{
546 ····················n7·-=·child.getMeasuredWidth()·+·((LinearLayout$LayoutParams)actionMenuView$LayoutParams).leftMargin·+·((LinearLayout$LayoutParams)actionMenuView$LayoutParams).rightMargin;546 ····················n7·-=·child.getMeasuredWidth()·+·((ViewGroup$MarginLayoutParams)actionMenuView$LayoutParams).leftMargin·+·((ViewGroup$MarginLayoutParams)actionMenuView$LayoutParams).rightMargin;
547 ····················this.hasSupportDividerBeforeChildAt(n8);547 ····················this.hasSupportDividerBeforeChildAt(n8);
548 ····················++n9;548 ····················++n9;
549 ················}549 ················}
550 ············}550 ············}
551 ············++n8;551 ············++n8;
552 ········}552 ········}
553 ········if·(childCount·==·(b3·?·1·:·0)·&&·!b2)·{553 ········if·(childCount·==·(b3·?·1·:·0)·&&·!b2)·{
Offset 571, 37 lines modifiedOffset 571, 37 lines modified
571 ········if·(layoutRtl)·{571 ········if·(layoutRtl)·{
572 ············int·n17·=·((ViewGroup)this).getWidth()·-·((ViewGroup)this).getPaddingRight();572 ············int·n17·=·((ViewGroup)this).getWidth()·-·((ViewGroup)this).getPaddingRight();
573 ············for·(int·i·=·0;·i·<·childCount;·++i)·{573 ············for·(int·i·=·0;·i·<·childCount;·++i)·{
574 ················final·View·child3·=·((ViewGroup)this).getChildAt(i);574 ················final·View·child3·=·((ViewGroup)this).getChildAt(i);
575 ················final·ActionMenuView$LayoutParams·actionMenuView$LayoutParams2·=·(ActionMenuView$LayoutParams)child3.getLayoutParams();575 ················final·ActionMenuView$LayoutParams·actionMenuView$LayoutParams2·=·(ActionMenuView$LayoutParams)child3.getLayoutParams();
576 ················if·(child3.getVisibility()·!=·n10)·{576 ················if·(child3.getVisibility()·!=·n10)·{
577 ····················if·(!actionMenuView$LayoutParams2.isOverflowButton)·{577 ····················if·(!actionMenuView$LayoutParams2.isOverflowButton)·{
578 ························final·int·n18·=·n17·-·((LinearLayout$LayoutParams)actionMenuView$LayoutParams2).rightMargin;578 ························final·int·n18·=·n17·-·((ViewGroup$MarginLayoutParams)actionMenuView$LayoutParams2).rightMargin;
579 ························final·int·measuredWidth3·=·child3.getMeasuredWidth();579 ························final·int·measuredWidth3·=·child3.getMeasuredWidth();
580 ························final·int·measuredHeight3·=·child3.getMeasuredHeight();580 ························final·int·measuredHeight3·=·child3.getMeasuredHeight();
581 ························final·int·n19·=·n5·-·measuredHeight3·/·2;581 ························final·int·n19·=·n5·-·measuredHeight3·/·2;
582 ························child3.layout(n18·-·measuredWidth3,·n19,·n18,·measuredHeight3·+·n19);582 ························child3.layout(n18·-·measuredWidth3,·n19,·n18,·measuredHeight3·+·n19);
583 ························n17·=·n18·-·(measuredWidth3·+·((LinearLayout$LayoutParams)actionMenuView$LayoutParams2).leftMargin·+·max);583 ························n17·=·n18·-·(measuredWidth3·+·((ViewGroup$MarginLayoutParams)actionMenuView$LayoutParams2).leftMargin·+·max);
584 ····················}584 ····················}
585 ················}585 ················}
586 ············}586 ············}
587 ········}587 ········}
588 ········else·{588 ········else·{
589 ············int·paddingLeft·=·((ViewGroup)this).getPaddingLeft();589 ············int·paddingLeft·=·((ViewGroup)this).getPaddingLeft();
590 ············for·(int·j·=·0;·j·<·childCount;·++j)·{590 ············for·(int·j·=·0;·j·<·childCount;·++j)·{
591 ················final·View·child4·=·((ViewGroup)this).getChildAt(j);591 ················final·View·child4·=·((ViewGroup)this).getChildAt(j);
592 ················final·ActionMenuView$LayoutParams·actionMenuView$LayoutParams3·=·(ActionMenuView$LayoutParams)child4.getLayoutParams();592 ················final·ActionMenuView$LayoutParams·actionMenuView$LayoutParams3·=·(ActionMenuView$LayoutParams)child4.getLayoutParams();
593 ················if·(child4.getVisibility()·!=·n10)·{593 ················if·(child4.getVisibility()·!=·n10)·{
594 ····················if·(!actionMenuView$LayoutParams3.isOverflowButton)·{594 ····················if·(!actionMenuView$LayoutParams3.isOverflowButton)·{
595 ························final·int·n20·=·paddingLeft·+·((LinearLayout$LayoutParams)actionMenuView$LayoutParams3).leftMargin;595 ························final·int·n20·=·paddingLeft·+·((ViewGroup$MarginLayoutParams)actionMenuView$LayoutParams3).leftMargin;
596 ························final·int·measuredWidth4·=·child4.getMeasuredWidth();596 ························final·int·measuredWidth4·=·child4.getMeasuredWidth();
597 ························final·int·measuredHeight4·=·child4.getMeasuredHeight();597 ························final·int·measuredHeight4·=·child4.getMeasuredHeight();
598 ························final·int·n21·=·n5·-·measuredHeight4·/·2;598 ························final·int·n21·=·n5·-·measuredHeight4·/·2;
599 ························child4.layout(n20,·n21,·n20·+·measuredWidth4,·measuredHeight4·+·n21);599 ························child4.layout(n20,·n21,·n20·+·measuredWidth4,·measuredHeight4·+·n21);
600 ························paddingLeft·=·n20·+·(measuredWidth4·+·((LinearLayout$LayoutParams)actionMenuView$LayoutParams3).rightMargin·+·max);600 ························paddingLeft·=·n20·+·(measuredWidth4·+·((ViewGroup$MarginLayoutParams)actionMenuView$LayoutParams3).rightMargin·+·max);
601 ····················}601 ····················}
602 ················}602 ················}
603 ············}603 ············}
604 ········}604 ········}
605 ····}605 ····}
606 ····606 ····
607 ····protected·void·onMeasure(final·int·n,·final·int·n2)·{607 ····protected·void·onMeasure(final·int·n,·final·int·n2)·{
Offset 624, 16 lines modifiedOffset 624, 16 lines modified
624 ········final·int·childCount·=·((ViewGroup)this).getChildCount();624 ········final·int·childCount·=·((ViewGroup)this).getChildCount();
625 ········if·(this.mFormatItems·&&·childCount·>·0)·{625 ········if·(this.mFormatItems·&&·childCount·>·0)·{
626 ············this.onMeasureExactFormat(n,·n2);626 ············this.onMeasureExactFormat(n,·n2);
627 ········}627 ········}
628 ········else·{628 ········else·{
629 ············for·(int·i·=·0;·i·<·childCount;·++i)·{629 ············for·(int·i·=·0;·i·<·childCount;·++i)·{
630 ················final·ActionMenuView$LayoutParams·actionMenuView$LayoutParams·=·(ActionMenuView$LayoutParams)((ViewGroup)this).getChildAt(i).getLayoutParams();630 ················final·ActionMenuView$LayoutParams·actionMenuView$LayoutParams·=·(ActionMenuView$LayoutParams)((ViewGroup)this).getChildAt(i).getLayoutParams();
631 ················((LinearLayout$LayoutParams)actionMenuView$LayoutParams).rightMargin·=·0;631 ················((ViewGroup$MarginLayoutParams)actionMenuView$LayoutParams).rightMargin·=·0;
632 ················((LinearLayout$LayoutParams)actionMenuView$LayoutParams).leftMargin·=·0;632 ················((ViewGroup$MarginLayoutParams)actionMenuView$LayoutParams).leftMargin·=·0;
633 ············}633 ············}
634 ············super.onMeasure(n,·n2);634 ············super.onMeasure(n,·n2);
635 ········}635 ········}
636 ····}636 ····}
637 ····637 ····
638 ····public·MenuBuilder·peekMenu()·{638 ····public·MenuBuilder·peekMenu()·{
639 ········return·this.mMenu;639 ········return·this.mMenu;