-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LayoutParams from support libraries and custom views #69
Comments
Also, here's a list of XML properties related to layout params:
Specific to GridLayout (API level 14, can be part of BaseDSL):
Specific to AppBarLayout (Design support library):
Specific to AbsoluteLayout (deprecated):
|
This narrows down the scope to:
The only possible way to mutate property of the class not known at compile time is via reflection. The performance should be an issue, since it's a one-time operation in app lifecycle (most apps have only one navigation drawer or sliding pane). |
AppBarLayout.LayoutParams has a layout_scrollFlags and layout_scrollInterpolator layout param |
Layout params are not handled by generated DSL now. They are handled by hand-written BaseDSL in anvil base library. There are custom views that use their own layout params that BaseDSL knows nothing about. So far there is no way to set such layout params except for calling
layoutParams
method directly.Here's a list of all ViewGroup.LayoutParams implementations:
AbsoluteLayout.LayoutParams - addsx
andy
to LayoutParams, but AbsoluteLayout is deprecatedActionBar.LayoutParams - addsgravity
to MarginLayoutParams, not via XMLActionMenuView.LayoutParams - addscellsUsed
,expandable
,extraPixels
,isOverflowButton
,preventEdgeOffset
to MarginLayoutParams, not via XMLBaseCardView.LayoutParams - addsviewType
to FrameLayout.LayoutParams, not via XMLCollapsingToolbarLayout.LayoutParams - adds CollapseMode and parallax multiplier to FrameLayout.LayoutParams, not via XMLanchorGravity
,gravity
andkeyline
to MarginLayoutParamsgravity
to MarginLayoutParamsgravity
to MarginLayoutParamsweight
andgravity
to MarginLayoutParamsLinearLayoutCompat.LayoutParams - also addsweight
andgravity
to MarginLayoutParams, rarely used and not via XMLweight
to MarginLayoutParamsToolbar.LayoutParams - same as ActionBar.LayoutParams, not via XMLwidth
andheight
ViewPager.LayoutParams - adds gravity andisDecor
to base LayoutParams, not via XMLWindowManager.LayoutParams - adds lots of fields, but none of them exporeted via XMLThe text was updated successfully, but these errors were encountered: