2017-09-04 3 views
1

Comment changer place FAB de droite à gauche dans RTL? Le problème est que la FAB est peut ne pas changer de position dans RTLComment placer un FAB à la fin | la gauche?

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    android:orientation="vertical" 
    android:padding="20dp"> 

    <android.support.design.widget.FloatingActionButton 
     android:id="@+id/fab" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_alignParentBottom="true" 
     android:layout_alignParentRight="false" 
     android:layout_gravity="left|end" 
     android:layout_marginBottom="16dp" 
     android:layout_marginRight="16dp" 
     app:backgroundTint="@color/colorPrimary" 
     app:borderWidth="0dp" 
     app:elevation="8dp" 
     app:fabSize="normal" 
     app:srcCompat="@drawable/add_icon" /> 


</RelativeLayout> 

I want the FAB as like in the image

Répondre

0

Ajouter à ce bouton flottant xml

android:layout_alignParentBottom="true" 
android:layout_alignParentEnd="true"