1
제품 이름 및 제품 등급을 올바르게 정렬하는 방법. 이름이 너무 길어 정렬이 같은 위치에 있지 않았기 때문에 db에서 제품 이름을 검색합니다. 제발 도와주세요 감사합니다android - 테이블 레이아웃 맞춤
<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tableLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:shrinkColumns="*"
android:stretchColumns="*" >
<TableRow
android:id="@+id/tableRow3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/birdnesttoppanel"
android:gravity="center_horizontal" >
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textStyle="bold"
android:typeface="serif" >
</TextView>
</TableRow>
<TableRow
android:id="@+id/tableRow4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal" >
<LinearLayout
android:layout_span="6"
android:gravity="center" >
<ImageButton
android:id="@+id/preview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_gravity="center"
android:background="@drawable/newclick"
android:text="Click here to view the picture" />
</LinearLayout>
</TableRow>
<TableRow
android:id="@+id/tableRow5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textSize="18dp"
android:textStyle="bold"
android:typeface="serif" >
</TextView>
</TableRow>
<TableRow
android:id="@+id/tableRow6new"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal" >
<LinearLayout
android:layout_span="6"
android:gravity="center" >
<TextView
android:id="@+id/ProductName1"
android:text="@string/ProductName"
android:textStyle="bold"
android:typeface="serif"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</TextView>
<TextView
android:id="@+id/ProductName2"
android:text=":"
android:textStyle="bold"
android:typeface="serif"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</TextView>
<TextView
android:id="@+id/ProductName3"
android:text=""
android:textStyle="bold"
android:typeface="serif"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</TextView>
</LinearLayout>
</TableRow>
<TableRow>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_span="6"
android:gravity="center"
android:textSize="2dp"
android:textStyle="bold"
android:typeface="serif" >
</TextView>
</TableRow>
<TableRow
android:id="@+id/tableRow6new1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal" >
<LinearLayout
android:layout_span="6"
android:gravity="center" >
<TextView
android:id="@+id/ProductGrade1"
android:text="@string/ProductGrade"
android:textStyle="bold"
android:typeface="serif"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
</TextView>
<TextView
android:id="@+id/ProductGrade2"
android:text=":"
android:textStyle="bold"
android:typeface="serif"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
</TextView>
<TextView
android:id="@+id/ProductGrade3"
android:text=""
android:textStyle="bold"
android:typeface="serif"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
</TextView>
</LinearLayout>
</TableRow>
"올바르게 정렬"이라는 용어는 여러 가지 의미로 해석 될 수 있습니다. 다음과 같이 구체적으로 작성하십시오. 두 레이블을 왼쪽에서 오른쪽, 다른 하나 위에 정렬하십시오. –
@AndyRes. 댓글 주셔서 감사합니다. 내 스크린 샷을 보면 제품 이름과 제품 등급이 다른 곳에서 볼 수 있습니다. 나는 둘 다 왼쪽에 맞추기를 원한다. –