/ / Android, FAB utilisant la conception du support Android est carré dans l'API ci-dessous 21 - android, floating-action-button

Android, FAB utilisant la conception du support Android est carré dans l'API ci-dessous 21 - Android, bouton flottant

J'utilise android support design library et tout semble bien sur API-21 mais pas sur API-16! Le FAB (Floating action button) est carré! Ceci est mon code de mise en page:

<android.support.v4.widget.DrawerLayout xmlns:app="http://schemas.android.com/apk/res/com.example.recycleviewtest"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/dl"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="#6fff"
android:fitsSystemWindows="true" >

<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

<include
android:id="@+id/toolbar"
layout="@layout/toolbar" />

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >

<android.support.v7.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="50dp" />

<android.support.design.widget.TextInputLayout
android:id="@+id/textInputLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content" >

<EditText
android:id="@+id/editName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter your name:"
android:singleLine="true" />
</android.support.design.widget.TextInputLayout>
</RelativeLayout>
</LinearLayout>

<android.support.design.widget.FloatingActionButton
android:id="@+id/floatingActionButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right|bottom"
android:layout_margin="30dp"
android:src="@android:drawable/ic_input_add" />
</android.support.design.widget.CoordinatorLayout>

<android.support.design.widget.NavigationView
android:layout_width="300dp"
android:layout_height="match_parent"
android:layout_gravity="start"
app:headerLayout="@layout/navigation_header"
app:itemBackground="@drawable/abc_list_pressed_holo_light"
app:itemTextColor="@color/abc_primary_text_material_light"
app:menu="@menu/main" />

Je ne mets rien dans mon java pour FAB et C'est le résultat!

Mon appareil à tester est Samsung galaxy note 10.1 avec android 4.1.2 (API-16)

Réponses:

8 pour la réponse № 1

C'est un punaise dans la bibliothèque de conception de support actuelle v22.2.0.

En attendant, essayez d’ajouter app:borderWidth="0dp" à votre FAB comme solution de contournement:

<android.support.design.widget.FloatingActionButton
...
app:borderWidth="0dp" />