3
나는리스트 뷰의 토대가되는 다음 코드를 가지고있다.tablerow의 체크 박스가 텍스트 뷰로 화면에서 밀려났다
아이디어는 항상 화면의 오른쪽에 정렬되는 확인란을 갖는 것입니다. 그것의 왼쪽에있는 텍스트가 너무 길면 나는 그것을 줄여서 "..."표시하거나 우아하게 잘라 버리고 싶습니다.
텍스트는 짧지 만 텍스트가 길면 정상적으로 작동합니다. 어떤 충고?
<?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">
<TableLayout android:id="@+id/TableLayout01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:stretchColumns="0"
>
<TableRow
android:id="@+id/TableRow01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<TextView android:id="@+id/name"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dip"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="This is a very very long title 12345678"
/>
<CheckBox android:id="@+id/checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</TableRow>
</TableLayout>
</LinearLayout>
감사합니다. 제가 테이블 레이아웃을 사용하는 이유는 제가 정말로하고 싶었던 것은 바로 정렬 된 체크 박스가있는리스트를 가지고 있기 때문입니다. 그리고 나서 구글은이 예제로 나를 이끌었습니다 : http://huuah.com/using-tablelayout-on-android/ 내가 권장하는대로 작동하지만 텍스트는 다음 줄에서 잘립니다. 지금은별로 중요하지 않습니다. 목록에 하나 이상의 항목이 있어야하기 때문에이 예제에 표시하기가 어렵습니다 ... –