레이아웃 XML이 있습니다. LinearLayout 안에 있습니다.Android TableLayout 맞춤
<TableLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TableRow
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:stretchColumns="1"
android:background="@android:color/background_dark">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text=" Hello world"
android:textSize="20dp"
android:layout_gravity="left"
android:padding="2dp"
android:background="#009900"
android:textColor="@android:color/white"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text=" v1.0"
android:textSize="20dp"
android:padding="2dp"
android:layout_gravity="right"
android:background="#009900"
android:textColor="@android:color/white"/>
</TableRow>
</TableLayout>
는이 같은 행 표시하려면 :
[ Title v1.0 ]
을하지만 같이 표시
[ Title v1.0 ]
작동합니다. 무게는 실제로 무엇을합니까? –
무게가 나머지 빈 공간을 배포하는 데 사용됩니다 –
이미지를 제발 제거 할 수 있습니까? 이름을 여기에 표시하고 싶지 않습니다. 게시하기 전에 변경해야합니다. –