Android M new control properties explained

Attribute description on FloatingActionButton:

app:layout_anchor=@id/appbar
means which layout area the FAB floating button is displayed in.
And set the position of the current anchor
app:layout_anchorGravity=”bottom|end|right”



Attribute description on NestedScrollView:
app:layout_behavior="@string/appbar_scrolling_view_behavior"
CoordinatorLayout contains subviews with scrolling attributes. Views need to set app: The layout_behavior attribute, which I understand is the scrolling layout of the content area in the middle. If you need to scroll up and down to respond to the associated animation, set this attribute, and others have said it. For details, please see: http://iaiai.iteye. com/blog/2280995



CoordinatorLayout attribute description:
android:fitsSystemWindows="false"
After specific experiments, the specific effect is whether your contentview ignores the actionbar, title, virtual buttons at the bottom of the screen, and treats the entire screen as available space.
Under normal circumstances, the available space of contentview is the remaining available area after removing the space for actionbar, title, and bottom buttons; if this property is set to true, it will be ignored, and false will not ignore the



properties of CollapsingToolbarLayout itself:
app:expandedTitleMarginEnd="0dp" app:expandedTitleMarginStart="48dp"
These two attributes mean that when the header is all displayed, the title text is in the position when it is fully expanded. I have defined the left 48

app:layout_scrollFlags="scroll|exitUntilCollapsed"
This property is defined in this tag, and set app:layout_scrollFlags="scroll|enterAlways" in the child control. This can specify which one is fixed at the top, and the child control fixed at the top is best defined behind the


child control CollapsingToolbarLayout child control property:
The value of the app:layout_collapseMode property, parallax/pin
parallax scrolls out of the hidden
pin and is fixed at the top of the screen

app:layout_collapseParallaxMultiplier="0.7"
to implement a parallax scrolling (such as the sibling view ImageView inside the CollapsingToolbarLayout). This usage combines app:layout_collapseParallaxMultiplier with CollapsingToolbarLayout's app:contentScrim="?attr/colorPrimary"


property using FloatingActionButton:
app:fabSize="normal"
This property determines whether the button is normal size or small size

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326487485&siteId=291194637