我正在使用'com.github.clans:fab:1.6.4'库来显示fab按钮,它们工作正常但是当我尝试更改按钮的图像时,图像显示为非常小,fab菜单按钮的图像根本没有变化。 有谁能告诉我如何解决这个问题?
这是xml代码:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:fab="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
<HorizontalScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:fillViewport="true"
android:scrollbars="none" >
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="1"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<TableLayout
android:layout_marginTop="10dp"
android:id="@+id/tabla_cuerpo"
android:layout_width="match_parent"
android:layout_height="362dp">
<TableRow
android:id="@+id/tableRow1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#BCBCBC">
<TextView
android:id="@+id/textView1a"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#BCBCBC" android:padding="5dp"
android:text="Case#"
android:textAppearance="?android:attr/textAppearanceMedium"></TextView>
<TextView
android:id="@+id/textView1b"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#BCBCBC" android:padding="5dp"
android:text="Client"
android:textAppearance="?android:attr/textAppearanceMedium"></TextView>
<TextView
android:id="@+id/textView1c"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#BCBCBC" android:padding="5dp"
android:text="Case Amount"
android:textAppearance="?android:attr/textAppearanceMedium"></TextView>
<TextView
android:id="@+id/textView1d"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#BCBCBC" android:padding="5dp"
android:text="Received"
android:textAppearance="?android:attr/textAppearanceMedium"></TextView>
<TextView
android:id="@+id/textView1e"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#BCBCBC" android:padding="5dp"
android:text="Reminder"
android:textAppearance="?android:attr/textAppearanceMedium"></TextView>
<TextView
android:id="@+id/textView1f"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#BCBCBC" android:padding="5dp"
android:text="Remarks"
android:textAppearance="?android:attr/textAppearanceMedium"></TextView>
</TableRow>
<TableRow
android:id="@+id/tableRow2"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/textView2a"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/cellshape"
android:padding="5dp"
android:text="Case#"
android:textAppearance="?android:attr/textAppearanceMedium"></TextView>
<TextView
android:id="@+id/textView2b"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/cellshape"
android:padding="5dp"
android:text="Client"
android:textAppearance="?android:attr/textAppearanceMedium"></TextView>
<TextView
android:id="@+id/textView2c"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/cellshape"
android:padding="5dp"
android:text="Case Amount"
android:textAppearance="?android:attr/textAppearanceMedium"></TextView>
<TextView
android:id="@+id/textView2d"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/cellshape"
android:padding="5dp"
android:text="Received"
android:textAppearance="?android:attr/textAppearanceMedium"></TextView>
<TextView
android:id="@+id/textView2e"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/cellshape"
android:padding="5dp"
android:text="Reminder"
android:textAppearance="?android:attr/textAppearanceMedium"></TextView>
<TextView
android:id="@+id/textView2f"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/cellshape"
android:padding="5dp"
android:text="Remarks"
android:textAppearance="?android:attr/textAppearanceMedium"></TextView>
</TableRow>
<TableRow
android:id="@+id/tableRow3"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/textView3a"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/cellshape"
android:padding="5dp"
android:text="Case#"
android:textAppearance="?android:attr/textAppearanceMedium"></TextView>
<TextView
android:id="@+id/textView3b"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/cellshape"
android:padding="5dp"
android:text="Client"
android:textAppearance="?android:attr/textAppearanceMedium"></TextView>
<TextView
android:id="@+id/textView3c"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/cellshape"
android:padding="5dp"
android:text="Case Amount"
android:textAppearance="?android:attr/textAppearanceMedium"></TextView>
<TextView
android:id="@+id/textView3d"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/cellshape"
android:padding="5dp"
android:text="Received"
android:textAppearance="?android:attr/textAppearanceMedium"></TextView>
<TextView
android:id="@+id/textView3e"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/cellshape"
android:padding="5dp"
android:text="Reminder"
android:textAppearance="?android:attr/textAppearanceMedium"></TextView>
<TextView
android:id="@+id/textView3f"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/cellshape"
android:padding="5dp"
android:text="Remarks"
android:textAppearance="?android:attr/textAppearanceMedium"></TextView>
</TableRow>
</TableLayout>
</LinearLayout>
</HorizontalScrollView>
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.github.clans.fab.FloatingActionMenu
android:id="@+id/fab_menu"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:paddingBottom="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
fab:menu_backgroundColor="#ccffffff"
fab:fab_colorNormal="#DA4336"
fab:fab_colorPressed="#E75043"
fab:fab_colorRipple="#99FFFFFF"
fab:fab_showShadow="true"
fab:menu_labels_colorNormal="#333333"
fab:menu_labels_colorPressed="#444444"
fab:menu_labels_colorRipple="#66FFFFFF"
fab:menu_labels_showShadow="true"
fab:menu_labels_maxLines="-1"
fab:menu_labels_position="left"
fab:menu_openDirection="up"
fab:fab_shadowColor="#66000000"
fab:menu_labels_ellipsize="end"
fab:menu_labels_singleLine="true">
<com.github.clans.fab.FloatingActionButton
android:id="@+id/fab2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/add_payment_btn"
fab:fab_label="ADD PAYMENT"
fab:fab_size="mini" />
<com.github.clans.fab.FloatingActionButton
android:id="@+id/fab3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/editcasesicon"
fab:fab_label="EDIT PAYMENT"
fab:fab_size="mini" />
</com.github.clans.fab.FloatingActionMenu>
</FrameLayout>
<ImageButton
android:id="@+id/imageButton1"
android:layout_width="60dp"
android:layout_height="60dp"
android:background="@drawable/delete"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_marginLeft="30dp"
android:layout_marginBottom="21dp"
/>
</RelativeLayout>