2017-10-07 12 views
-5

Les FloatingActionButton donnent frontière rose hilarante bien que je ne ai pas besoin que l'autre est mon image originale que je joins avec FloatingActionButtonbouton d'action flottante donne bordure de couleur non nécessaire

enter image description here

enter image description here

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:app="http://schemas.android.com/apk/res-auto" 
xmlns:tools="http://schemas.android.com/tools" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
tools:context="com.example.android.myapplication.MainActivity"> 

<ImageView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_centerHorizontal="true" 
    android:layout_centerVertical="true" 
    android:src="@drawable/screen_logo"/> 
<LinearLayout 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:orientation="vertical" 
    android:layout_alignParentRight="true" 
    android:layout_alignParentBottom="true" 
    > 
    <android.support.design.widget.FloatingActionButton 
     android:id="@+id/view" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:src="@drawable/view" 
     android:layout_margin="5dp"/> 
    <android.support.design.widget.FloatingActionButton 
     android:id="@+id/search" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_margin="5dp" 
     android:src="@drawable/search"/> 
    <android.support.design.widget.FloatingActionButton 
     android:id="@+id/add" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_margin='5dp' 
     android:src="@drawable/add"/> 
</LinearLayout> 

+4

parts votre mise en page XML pour le bouton d'action flottante –

+1

attach Code à la question –

Répondre

0

sa frontière de 0 pas

vous pouvez utiliser app:backgroundTint="@color/colorPrimary" changer backdround couleur de FloatingActionButton

ou essayez cette utilisation trick Imageview au lieu de FloatingActionButton

<ImageView 
    android:id="@+id/search" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:clickable="true" 
    android:src="@drawable/search" /> 

Que dans votre Activity.java

ImageView searchImageView = (ImageView) findViewById(R.id.search); 
searchImageView.setOnClickListener(new OnClickListener() { 
    public void onClick(View v) { 
    //perform your action here 
    } 
}); 
0

changement colorAccent bleu en color.xml

ou utiliser app:backgroundTint