Теперь ширина каждой строки изменяется в зависимости от размера текста. Но мне нужен фиксированный размер для каждого столбца, такого как excel. Что нужно изменить? Это не должно быть match_parent, так как родитель имеет очень большую ширину ..Как я могу исправить ширину столбца?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin"
android:textAppearance="?attr/textAppearanceListItem" />
<TextView
android:id="@+id/email"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin"
android:textAppearance="?attr/textAppearanceListItem" />
<TextView
android:id="@+id/short_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin"
android:textAppearance="?attr/textAppearanceListItem" />
</LinearLayout>
EDIT
Текущий выпуск он показывает что-то вроде
Chris [email protected] R
Apostole [email protected] -
Но что я хочу
Chris [email protected] R
Apostole [email protected] -
Я попробовал версию @Priyank Prajapati, но она до дает прежнее расположение
Add Static ширина –
для всех изменений TextViews 'андроида: layout_width = match_parent' и добавить' андроида: вес = 1' –
изменение 'layout_width = "0dp"' 'и добавить layout_weight = "1" '; –