C'est ce dont j'ai besoin. Mais je finis par utiliser pleine largeur en raison de alignParentRight = true ou l'horodatage est coupé pendant mes expériences.La largeur de la mise en page ne progresse pas pour tous les scénarios. J'obtiens la rangée supérieure pleine largeur (non désirée) ou ai l'horodatage coupé si le texte ci-dessous devient plus petit
Comment puis-je obtenir la sortie est comme ça.
Voici mon code.Please voir la mise en page qui ne fonctionne que si le texte est plus petite que la rangée supérieure. si le texte va grand, l'icône et l'horodatage ne marche pas s'aligné sur la largeur du texte, de façon appropriée ... ne pouvait pas le faire fonctionner ...
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<View
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="@dimen/margin_10"
android:layout_marginBottom="@dimen/margin_10"
android:layout_marginTop="@dimen/margin_10"
android:background="@color/colorDarkGrey"
android:visibility="gone" />
<RelativeLayout
android:id="@+id/checkbox_layout_id"
android:layout_width="35dp"
android:layout_height="match_parent"
android:layout_alignBottom="@+id/status_layt_id"
android:layout_alignTop="@+id/status_layt_id"
android:background="@android:color/darker_gray"
android:visibility="visible">
<CheckBox
android:id="@+id/checkbox_id"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerVertical="true" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_toRightOf="@+id/checkbox_layout_id"
android:paddingTop="8dp">
<!--chat message holder-->
<LinearLayout
android:id="@+id/chat_message_holder"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/status_lyt_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/chat_white_bg_rounded_corner"
android:minWidth="130dp"
android:orientation="vertical">
<!--header-->
<!--<include layout="@layout/adapter_comment_message_header"></include>-->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="visible"
android:orientation="horizontal">
<TextView
android:id="@+id/who_sent_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:text="Directors name"
android:layout_marginLeft="12dp"
android:textColor="#696969"
android:layout_marginRight="16dp"
android:textSize="14sp" />
<!--<LinearLayout-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content">-->
<ImageView
android:id="@+id/status_message_id"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginRight="4dp"
android:layout_toLeftOf="@+id/timestamp_id"
android:src="@drawable/chat_svg_not_reached_ic"
android:tint="#696969" />
<TextView
android:id="@+id/timestamp_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_gravity="right"
android:fontFamily="sans-serif"
android:gravity="right"
android:text="10:12 pm"
android:textColor="#696969"
android:textSize="14sp"
android:textStyle="normal" />
<!--</LinearLayout>-->
</LinearLayout>
<!--content body-->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:orientation="vertical"
android:paddingBottom="8dp"
android:paddingRight="12dp"
android:paddingTop="0dp">
<TextView
android:id="@+id/message_tv_id"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:padding="0dp"
android:text="SomeSomeSomeSomeSome.."
android:textColor="#D8000000"
android:textSize="18sp"
android:visibility="visible" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
un peu de code s'il vous plaît – Nisarg
@Nisarg nouveau à ce ... donc essayer de poster ici .. – Trellis
son show bien nous votre fichier XML de mise en page – Nisarg