Mein XML-Code ist:Wie überlagern Sie TextView auf Button?
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right">
<Button
android:id="@+id/btnMyDeals"
android:layout_width="wrap_content"
android:layout_height="32dp"
android:layout_gravity="right"
android:layout_marginRight="8dp"
android:text="DEALS"
android:textSize="18sp"
android:textColor="@color/white"
android:background="@drawable/rounded_deals_button"
android:layout_alignParentTop="true"/>
<TextView
android:id="@+id/badge_notification_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:drawable/ic_notification_overlay"
android:text="23"
android:textColor="#FFF"
android:textSize="12sp"
android:textStyle="bold" />
</RelativeLayout>
Ich mag TextView
Blase, die ein Benachrichtigung Abzeichen ist die Button
zu schweben. TextView
kann über der oberen rechten oder linken oberen Ecke von Button
schweben. Wie geht das?
Verwenden Sie FrameLayout. – Amy
wie? Kannst du eins machen? Ich werde diese Antwort akzeptieren – Ritzor