FloatingActionButton 不能正常显示为圆形

使用 compile 'com.android.support:design:22.2.0'
实现FloatingActionButton效果的问题:

1. 在低于API17时会展示为方形而不是圆形,这只属性 app:borderWidth="0dp" 解决该问题;
2. 不能有名为fab_background的drawable资源;

 

 

 

This is known by Google and will be fix soon in the next version of the Design Support Library, see this issue: FAB Appears as a square on API 16. It should only concern API 16.

The workaround, proposed in the same thread, is to add app:borderWidth="0dp" to your FAB.

 

posted @ 2015-07-17 15:30  牵着蜗牛去逛街  阅读(629)  评论(0编辑  收藏  举报