I am trying to make a custom listView item with an image button and two textviews. The textview should be on the right as I am getting on the image below(android studio)
but I am getting this instead
The xml:
<RelativeLayout xmlns:android="http://ift.tt/nIICcg"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/account_item"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:paddingRight="5dp"
android:longClickable="true"
android:clickable="true">
<ImageButton
android:layout_width="35dp"
android:layout_height="35dp"
android:id="@+id/logo"
android:elevation="3dp"
android:layout_marginLeft="5dp"
android:layout_marginTop="2dp"
android:layout_marginRight="5dp"
android:layout_marginBottom="2dp"
android:layout_alignParentEnd="false"
android:layout_alignParentStart="true"
android:focusable="false"
android:focusableInTouchMode="false" />
<TextView
android:id="@+id/account_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:textSize="15sp"
android:textIsSelectable="false"
android:text="1234567890"
android:layout_alignTop="@+id/logo"
android:layout_alignParentEnd="true" />
<TextView
android:id="@+id/code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:singleLine="true"
android:text="30-15-10"
android:textSize="10sp"
android:layout_below="@+id/account_number"
android:layout_alignStart="@+id/account_number" />
</RelativeLayout>
Halp?
Aucun commentaire:
Enregistrer un commentaire