나는 ListView 액티비티를 가지고있다.리스트 뷰를 클릭하면 더 많은 아이템을리스트에로드 할 수있다.Android에서 ListView add footerView()에 바닥 글을 추가하고 있습니까?
mInflater.inflate(R.layout.list_load_more_row, null);
TextView footer = (TextView) findViewById(R.id.loadMore);
getListView().addFooterView(footer);
setListAdapter(ListViewHelper.getAdapterForContentList(mContent, this));
그러나 임 디버거
java.lang에서이 예외를 받고 : 목록 내 SimpleAdapter 문자열의 맵을 기본으로하고 어댑터가 설정되기 전에 내가 바닥 글을 추가하려면이 중위을 백업 .NullPointerException android.widget.ListView.clearRecycledState (ListView.java:489) android.widget.ListView.resetList (ListView.java:476) android.widget.ListView.setAdapter (ListView.java:417)
뭐가 잘못 되었나요? 목록에 내 꼬리말을 추가하는 방법은 무엇입니까? ?
[편집] 활동이 list_load_more_row.xml 사용 : 위의 자신의 코멘트에 명시된 ognian로
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/loadMore"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="17sp"
android:textStyle="bold"
android:textColor="#000000"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
android:gravity="center_horizontal|center_vertical"
android:text="@string/hello" />
당신은 아마뿐만 아니라 당신의 XML을 게시해야한다. – Christian
에 더 많은 코드가 필요할 수 있습니다. 자세한 로그캣 보고서를 게시 할 수 있습니까? – st0le
아마 R.id.loadMore가 부 풀었습니다. – ognian