Ich versuche, Textansicht oben auf Floating Action Button anzuzeigen. Innerhalb FrameLayout, habe ich 1 FAB und 1 Textview:Floating-Aktion-Schaltfläche wird immer oben angezeigt
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|start"
android:padding="@dimen/fab_margin">
<android.support.design.widget.FloatingActionButton
android:id="@+id/fabAddSeller"
android:layout_width="70dp"
android:layout_height="70dp"
app:backgroundTint="#3780f4"
android:stateListAnimator="@null"/>
<TextView
android:id="@+id/tvSellRecordCount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/sell_record_counter"
android:layout_gravity="top|end"
android:text="12"
android:textColor="#FFFFFF"
android:textSize="10sp" />
</FrameLayout>
Nach diesem answer habe ich
android hinzugefügt: stateListAnimator = "@ null"
FAB - nein Unterschied. Ich habe TextView nach FAB gesetzt - kein Effekt.
Wie andere Ansicht oben auf FloatingActionButton zeigen?
Kontrolle dieses http: //stackoverflow.com/questions/24459352/how-can-i-add-the-new-floating-actio n-button-zwischen-zwei-widgets-layouts – Stallion
höhe ist eine option? Ich bin mir nicht sicher, welches ist Ihr minSdk – W0rmH0le
Verwenden Sie eine RelativeLayout! versuche, TextView Property ** android: layout_above = "@ id/fabAddSeller" ** –