다음은 db에서 listview로 데이터를 가져 오는 코드입니다.DB의 데이터 일부만 목록보기에 표시하는 방법
private void fillData() {
Cursor c = viewDB.fetchAllRows();
startManagingCursor(c);
String[] from = new String[] { ViewComplaintsDataDB.KEY_NUMBER,
ViewComplaintsDataDB.KEY_DESCRIPTION,
ViewComplaintsDataDB.KEY_LOGGEDBY }; //these three are the fields in my db
int[] to = new int[] { R.id.com_num, R.id.com_desc , R.id.user }; //these three are the textview id's in my listitem.xml file
SimpleCursorAdapter simple = new SimpleCursorAdapter(this,
R.layout.listitem, c, from, to);
setListAdapter(simple);
}
내 DB의 두 번째 열 아래에는 각 행에 많은 데이터가 있습니다. 두 번째 필드의 데이터 만 50 자까지 목록보기로 표시 할 수 있습니까? 도와주세요. 그것에 대해
감사합니다. 문제가 해결되었습니다 – Santhosh
50 자 이상의 텍스트에 3 개의 점 (...)을 추가하고 싶습니다. 어떻게 추가 할 수 있습니까? – Santhosh
잘 모르겠습니다 만 전화 관련 문제 일 수 있습니다. 나는 에뮬레이터에서 3 개의 점을 얻지 못하므로 각 전화기가 각각의 방식으로이 점을 처리 할 수 있습니다. – colegu