Вероятно, это очень глупый вопрос, но у меня было несколько вопросов о том, как выглядит макет XML для этих элементов списка.

Я знаю, что есть три текстовых просмотра, но как они оставили отступ последней строки? Кроме того, как они заставили второе текстовое представление переноситься после заданного количества строк?
Если бы кто-то мог опубликовать образец XML, это тоже было бы здорово.
Ответ 1 · Yashwanth Kumar
используйте следующий xml, последнее текстовое представление справа.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:maxLines="2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:maxLines="5"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</LinearLayout>
Ответ 2 · K-ballo
Последний TextView - это либо макет, выровненный по правому краю (layout_gravity), либо он соответствует ширине родителя и имеет гравитацию (не макета, а собственную) справа.
Чтобы задать размер второго TextView в виде эллипса, задайте ему допустимую высоту, а затем установите для атрибута ellipsize значение end.
Ответ 3 · mthpvg
Рецепт - ScrollView + TextView + LinearLayout + гравитация. Для того же взгляда проверьте:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<ScrollView
android:id="@+id/sv"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:textSize="24dip"
android:layout_height="wrap_content"
android:text="Morning"
/>
<TextView
android:layout_width="fill_parent"
android:textSize="14dip"
android:layout_height="wrap_content"
android:text="Layout container for a view hierarchy that can be scrolled by the user, allowing it to be larger than the physical display. A ScrollView is a FrameLayout, meaning you should place one child in it containing the entire contents to scroll; this child may itself be a layout manager with a complex hierarchy of objects. A child that is often used is a LinearLayout in a vertical orientation, presenting a vertical array of top-level items that the user can scroll through. "
/>
<TextView
android:layout_width="fill_parent"
android:textSize="12dip"
android:layout_height="wrap_content"
android:text="Morning"
android:gravity="right"
/>
<TextView
android:layout_width="fill_parent"
android:textSize="24dip"
android:layout_height="wrap_content"
android:text="Morning"
/>
<TextView
android:layout_width="fill_parent"
android:textSize="14dip"
android:layout_height="wrap_content"
android:text="Layout container for a view hierarchy that can be scrolled by the user, allowing it to be larger than the physical display. A ScrollView is a FrameLayout, meaning you should place one child in it containing the entire contents to scroll; this child may itself be a layout manager with a complex hierarchy of objects. A child that is often used is a LinearLayout in a vertical orientation, presenting a vertical array of top-level items that the user can scroll through. "
/>
<TextView
android:layout_width="fill_parent"
android:textSize="12dip"
android:layout_height="wrap_content"
android:text="Morning"
android:gravity="right"
/>
<TextView
android:layout_width="fill_parent"
android:textSize="24dip"
android:layout_height="wrap_content"
android:text="Morning"
/>
<TextView
android:layout_width="fill_parent"
android:textSize="14dip"
android:layout_height="wrap_content"
android:text="Layout container for a view hierarchy that can be scrolled by the user, allowing it to be larger than the physical display. A ScrollView is a FrameLayout, meaning you should place one child in it containing the entire contents to scroll; this child may itself be a layout manager with a complex hierarchy of objects. A child that is often used is a LinearLayout in a vertical orientation, presenting a vertical array of top-level items that the user can scroll through. "
/>
<TextView
android:layout_width="fill_parent"
android:textSize="12dip"
android:layout_height="wrap_content"
android:text="Morning"
android:gravity="right"
/>
</LinearLayout>
</ScrollView>
</LinearLayout>
(Вы можете заменить TextViews на ListView)
РЕДАКТИРОВАТЬ: я думаю, что каждый дает вам немного решения здесь :).