Ich mache ein Layout:Wie füge ich Text darüber hinzu?
ist hier ein Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#373c5c"
android:gravity="center_vertical"
android:orientation="vertical" >
<LinearLayout android:id="@+id/list_offer_item_container"
android:layout_marginTop="15dp"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape"
android:orientation="horizontal"
android:padding="10dp">
<ImageView
android:id="@+id/imgcreditcompany"
android:layout_width="36dp"
android:layout_marginRight="4dp"
android:layout_marginTop="0dp"
android:layout_marginBottom="0dp"
android:contentDescription="@string/app_name"
android:layout_height="36dp" />
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:gravity="start"
android:orientation="vertical" >
<TextView
android:id="@+id/txtname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginTop="1dp"
android:textColor="#48899f"
android:textSize="@dimen/textsizeearncredit_title"
android:text="Name"
android:textAllCaps="false"
android:textStyle="normal|bold" />
<TextView
android:id="@+id/txtdesc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginTop="1dp"
android:maxLines="1"
android:textColor="#80869c"
android:textSize="@dimen/textsizeearncredit_desc"
android:text="This is a description of the offer and this is just a demo to show off 3 lines stacking correctly on top of each other"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginRight="20dp"
android:gravity="end"
android:layout_gravity="center_vertical">
<TextView android:id="@+id/list_offer_badge_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/list_offer_item_container"
android:textColor="@color/md_amber_700"
android:textSize="12sp"
android:visibility="gone"
android:text=""/>
</LinearLayout>
<ImageView
android:id="@+id/nextArrow"
android:layout_alignParentRight="true"
android:tint="@color/md_grey_300"
android:rotation="180"
android:layout_width="32dp"
android:visibility="gone"
android:layout_marginRight="16dp"
android:layout_gravity="center"
android:layout_centerVertical="true"
android:layout_height="32dp"
android:contentDescription="@string/app_name"
android:padding="@dimen/two" />
</LinearLayout>
</RelativeLayout>
Wie ein Text über die Schaltfläche Stil 'lineare Layout hinzufügen?
Ich möchte zum Beispiel "Hallo lieber Benutzer! Überprüfen Sie es unten".
Wo Textview, wo fügen Sie mehr Layout oder was auch immer?
Können Sie genauer sein? Was "Button-Stil" lineares Layout? Welcher davon ist der Text, den Sie hinzufügen möchten? –
@ KamilGryboś über diesem: @ + id/list_offer_item_container –