Я пытался построить этот макет как путь из 3 человек для представления отправителя и получателя пакета: Макет, который я хочу
Но я не могу достичь этого. Мой результат ... плохой
мой плохой результат
Это мой код раскладки:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/rlMain"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#76e6e6e6"
android:padding="4dp"
android:divider="@drawable/contact_divider"
android:layout_margin="1dp">
<TextView
android:id="@+id/txtvRichiestaID"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="false"
android:layout_centerVertical="false"
android:gravity="end|center_vertical"
android:visibility="gone"
android:text="CODICE RICHIESTA"
android:textSize="10sp" />
<!-- box blue -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum=""
android:background="@drawable/gradient_celeste"
>
<LinearLayout
android:id="@+id/box_mittente"
android:layout_width="0dp"
android:layout_weight="2"
android:layout_margin="5dp"
android:background="@drawable/box_arrotondato_mittente"
android:orientation="vertical"
android:layout_height="match_parent">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/imgMittente"
android:layout_width="@dimen/account_photo_dim"
android:layout_height="@dimen/account_photo_dim"
android:layout_centerVertical="true"
android:layout_margin="5dp"
android:background="@drawable/chatplaceholder" />
<TextView
android:id="@+id/nomeMittente"
android:layout_width="match_parent"
android:textSize="10sp"
android:ellipsize="middle"
android:textAlignment="center"
android:textColor="@android:color/white"
android:textStyle="bold"
android:layout_height="wrap_content"
android:text="Nome\n Mittente"/>
</LinearLayout>
<!-- boxer yellow --->
<LinearLayout
android:id="@+id/box_trasportatore"
android:layout_width="0dp"
android:layout_weight="2"
android:layout_margin="5dp"
android:background="@drawable/box_arrotondato_trasportatore"
android:layout_height="match_parent">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/imgTrasportatore"
android:layout_width="@dimen/account_photo_dim"
android:layout_height="@dimen/account_photo_dim"
android:layout_centerVertical="true"
android:layout_margin="5dp"
android:background="@drawable/chatplaceholder" />
<LinearLayout
android:layout_width="match_parent"
android:orientation="horizontal"
android:gravity="center"
android:layout_height="match_parent">
<TextView
android:id="@+id/nomeTrasportatore"
android:layout_width="wrap_content"
android:textSize="10sp"
android:ellipsize="middle"
android:textAlignment="center"
android:textColor="@android:color/white"
android:textStyle="bold"
android:layout_height="wrap_content"
android:text="Nome\n Trasportatore"/>
</LinearLayout>
</LinearLayout>
<!-- boxer green --->
<LinearLayout
android:id="@+id/box_destinatario"
android:layout_width="0dp"
android:layout_weight="2"
android:layout_margin="5dp"
android:background="@drawable/box_arrotondato_destinatario"
android:layout_height="match_parent">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/imgDestinatario"
android:layout_width="@dimen/account_photo_dim"
android:layout_height="@dimen/account_photo_dim"
android:layout_centerVertical="true"
android:layout_margin="5dp"
android:background="@drawable/chatplaceholder" />
<LinearLayout
android:layout_width="match_parent"
android:orientation="horizontal"
android:gravity="center"
android:layout_height="match_parent">
<TextView
android:id="@+id/nomeDestinatario"
android:layout_width="wrap_content"
android:textSize="10sp"
android:ellipsize="middle"
android:textAlignment="center"
android:textColor="@android:color/black"
android:textStyle="bold"
android:layout_height="wrap_content"
android:text="Nome\n Destinatario"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
Может кто-нибудь мне помочь? Это для того, чтобы представлять транспортную посылку другим. Спасибо за любую помощь! :)