CoordinatorLayout

原:CoordinatorLayout is a super-powered {@link android.widget.FrameLayout FrameLayout}.
译:Coordinatorlayout是一个超强的Framelayout。

原:CoordinatorLayout is intended for two primary use cases:
译:Coordinatorlayout用于两种使用情况:

原:As a top-level application decor or chrome layout //情况一
译:作为一个顶级应用的装饰品或Chrome布局

原:As a container for a specific interaction with one or more child views //情况二
译:作为一个容器,用于与一个或多个子View进行特定的交互

原:By specifying {@link CoordinatorLayout.Behavior Behaviors} for child views of a CoordinatorLayout you can provide many different interactions within a single parent and those views can also interact with one another. View classes can specify a default behavior when used as a child of a CoordinatorLayout using the {@link CoordinatorLayout.DefaultBehavior DefaultBehavior} annotation.
译:你可以通过指定CoordinatorLayout子View们的Behaviors,这些Behaviors提供了许多不同的交互,包括子View们和CoordinatorLayout的交互,子View们之间的交互。当CoordinatorLayout的子View使用DefaultBehavior注释的时候,该View可以指定默认的behavior.

原:Behaviors may be used to implement a variety of interactions and additional layout modifications ranging from sliding drawers and panels to swipe-dismissable elements and buttons that stick to other elements as they move and animate.
译:Behaviors可以被用来实现各种交互,和额外的布局修改,这些修改来自滑动抽屉和面板(由于移动和动画而去刷新元素和button)。

原:Children of a CoordinatorLayout may have an {@link CoordinatorLayout.LayoutParams#setAnchorId(int) anchor}. This view id must correspond to an arbitrary descendant of the CoordinatorLayout, but it may not be the anchored child itself or a descendant of the anchored child. This can be used to place floating views relative to other arbitrary content panes.
译:CoordinatorLayout的子View可以有个anchor。这一View的id必须与CoordinatorLayout任意子View相对应,但它可能不是孩子本身或锚的锚定孩子的后代。这可以用来放置浮动的View相对其他任意内容窗格。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值