FloatingActionButton.java 文件源码

java
阅读 33 收藏 0 点赞 0 评论 0

项目:test4XXX 作者:
public FloatingActionButton(Context context, AttributeSet attrs, int defStyleAttr,
        int defStyleRes) {
    super(context, attrs, defStyleAttr);

    setClickable(true);

    // Set the outline provider for this view. The provider is given the outline which it can
    // then modify as needed. In this case we set the outline to be an oval fitting the height
    // and width.
    setOutlineProvider(new ViewOutlineProvider() {
        @Override
        public void getOutline(View view, Outline outline) {
            outline.setOval(0, 0, getWidth(), getHeight());
        }
    });

    // Finally, enable clipping to the outline, using the provider we set above
    setClipToOutline(true);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号