简体   繁体   English

如何使FAB按钮的形状像三角形

[英]How to make shape of FAB button to be like triangle

I want to make FAB Button in triangular shape, But usually FAB is in circle shape. 我想将FAB按钮制成三角形,但通常FAB是圆形。 How will I achieve it. 我将如何实现它。

Try like this: 尝试这样:

  • take triangular shape Drawable and add it 取三角形可绘制并添加

  • app:backgroundTint should be "null" app:backgroundTint应该为“ null”

I haven't try this yet, but this is my idea. 我还没有尝试过,但这是我的主意。 What if you: 如果您怎么办:

  • make transparent to background color of button using property 使用属性使按钮的背景色透明
    background or background-tint 背景背景色
  • add triangle image using property src 使用属性src添加三角形图像

However, we are not suggested to change the shape of the button. 但是,我们不建议更改按钮的形状。 Look this: Float Action Button 看起来像: 浮动操作按钮

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用自定义形状的 fab 按钮制作底部栏? - How make Bottombar with custom shape fab button? 如何使按钮像FAB那样浮在布局上,或者使一个FAB具有双按钮? - How to make a button float over layout like a FAB, or make one FAB with double button? 使形状看起来像按钮 - Make a shape to look like a button 如何在android上更改浮动操作按钮(FAB)的形状? - How to change the shape of Floating Action Button (FAB) on android? Android:使用xml定义创建一个三角形的按钮(可绘制) - Android: Make a button with triangle shape using xml definitions (drawable) 如何将 FAB 塑造为圆角按钮(药丸形状),类似于联系人应用程序的联系人详细信息屏幕? - How to shape a FAB to be rounded corners button (pill shape), similar to in contact-details screen of Contacts app? Android:如何在右上角的按钮角添加三角形 - Android: how to add a triangle shape in the right-top button corner 如何制作自定义形状按钮? - How make a custom shape button? 我如何才能在我的 ui 背景中为 fab 按钮“剪出”圆形? - How would I be able to “cut out” a circular shape for a fab button in my ui background? 带阴影的圆形按钮,如 5.0 FAB - Circular button with shadow like 5.0 FAB
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM