为什么我的浮动操作按钮显示不正确? [英] Why is my floating action button not displaying properly?

查看:98
本文介绍了为什么我的浮动操作按钮显示不正确?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的浮动按钮图片如下

这是一个较大的圆圈内的一个较小的按钮,我该如何解决?

It's a smaller button inside a larger circle, How do I fix this?

布局文件:

 <android.support.design.widget.FloatingActionButton
    android:id="@+id/addToKitchenButton"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_margin="16dp"
    android:layout_gravity="bottom|end"
    android:layout_alignParentBottom="true"
    android:layout_alignParentEnd="true"
    android:src="@drawable/ic_add_circle_black_50dp"
    />

矢量代码:

  <vector android:height="50dp" android:viewportHeight="24dp"
    android:viewportWidth="24dp" android:width="50dp" xmlns:android="http://schemas.android.com/apk/res/android">

    <path android:fillColor="#FF000000" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM17,13h-4v4h-2v-4L7,13v-2h4L11,7h2v4h4v2z"/>

</vector>

推荐答案

我回答了您之前的问题,所以我想我已经意识到您在这里错过了什么.看看这张图片.您不小心添加了添加圈子.添加选定的24dp或48dp白色,它将起作用."> 1

I answered your previous question so I think I have realised what you missed here. Have a look at this image. You have accidentally added the Add circle. Add the selected one with 24dp or 48dp with white color it will work]1

这篇关于为什么我的浮动操作按钮显示不正确?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆