Я пытаюсь добавить 8 текстовых просмотров в моем довольно простом макете. Я хотел бы иметь два текстовых вида на строку и четыре таких строки. Моя задача была выстроена в 2-м, 4-м, 6-м и 8-м текстовых представлениях в этом макете. Текст в виде 1-го, 3-го, 5-го и 7-го текстовых видов имеет разную длину.Несколько текстовых представлений не выравниваются должным образом в Linear Layout
Я не могу выровнять текстовые представления seocnd в каждой строке, которая будет выровнена по вертикали.
В основном, эти виды текста не должны начинаться с одной и той же линии, вертикально, независимо от того, что когда-либо длина первого взгляда текста в этой строке:
может кто-то помочь?
Вот мой XML.
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/productDetailsLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/white"
android:orientation="vertical" >
<include
android:layout_width="wrap_content"
android:layout_height="wrap_content"
layout="@layout/logo_logout" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp" >
<TextView
android:id="@+id/ProductDetailsTitle"
android:layout_width="wrap_content"
android:layout_height="43dp"
android:layout_marginTop="10dp"
android:background="@color/Navy"
android:gravity="center"
android:text="@string/ProductDetailsTitle"
android:textColor="@color/white"
android:textSize="20dp"
android:textStyle="bold" />
<Button
android:id="@+id/ProductDetailsEditButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_weight="0.36"
android:text="Edit"
android:textSize="20dp" />
</LinearLayout>
<include
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
layout="@layout/product_details_mainpage_part1" />
<include
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
layout="@layout/product_details_mainpage_part2" />
<include
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
layout="@layout/product_details_mainpage_part3" />
<include
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
layout="@layout/product_details_mainpage_part44" />
</LinearLayout>