Я пытаюсь показать несколько данных на экране просмотра списка Android, но моя проблема заключается в том, что данные продолжают разрывать строки столбцов, а не появляться в соответствующих столбцах. Вот мой XML: Я пытаюсь показать несколько данных в виде списка андроидов
<ListView
android:id="@+id/listView"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_centerInParent="true"
android:choiceMode="singleChoice"
android:textAlignment="center"/>
</RelativeLayout>
Вот как определяются строки:
<?xml version="1.0" encoding="utf-8"?>
<!-- row.xml -->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:paddingTop="4dip"
android:paddingBottom="6dip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="center">
<TextView android:id="@+id/FROM_CELL"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"/>
<TextView android:id="@+id/FROMTIME_CELL"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"/>
<TextView android:id="@+id/TOTIME_CELL"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"/>
<TextView android:id="@+id/TITLE_CELL"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:layout_weight="1"/>
</LinearLayout>
Различные столбцы на экране никогда не приходит на той же колонке, но сдвинуты вправо на точная длина данных в предыдущем столбце. Пожалуйста, дайте мне знать, как позаботиться об этом. Заранее спасибо :)
Кажется, я не могу добавить скриншот, пожалуйста, сообщите, есть ли возможность. – cbandroid
Вы должны загрузить на tinypic или где-то :) –
@cbandroid Я загрузил ответ, попробую, чтобы он вам помог ... :) – Umair