任意のテキストを含む TextView を含む動的サイズの RelativeLayout があります。また、タイムスタンプ付きの固定サイズの TextView があります。RelativeLayout と TextView の両方をタイムスタンプとともに 1 行に並べて配置したいと考えています。
このような:
私が本当に得ているもの:
ご覧のとおり、テキストを含むレイアウトは幅全体を占めています。
XML:
<RelativeLayout android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/news_list_element"
android:layout_marginRight="5dip"
android:layout_alignParentLeft="true"
android:focusable="false"
android:paddingRight="8dip"
android:paddingLeft="17dip"
android:paddingTop="4dip"
android:paddingBottom="4dip">
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/news_list_text"
android:background="@android:color/transparent"
android:textColor="#000000"
android:focusable="false"
android:padding="3dip"
/>
</RelativeLayout>
<TextView android:id="@+id/messages_dialog_timestamp_in"
android:background="#000000"
android:text="12:05"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_toRightOf="@id/news_list_element"
android:paddingBottom="9dip"
android:paddingLeft="0dip"
android:textColor="#8f9eac"
/>