목록보기에 제목 표시 줄을 추가하고 싶습니다.제목이있는 Android 목록보기
내가 제목 역할을 할 수있는 목록보기 안에 텍스트 뷰를 추가 한:
레이아웃 파일 :
listView = (ListView) findViewById(R.id.rectran);
TextView textView = new TextView(getApplicationContext());
textView.setText("header view");
listView.addHeaderView(textView);
: 여기
<LinearLayout android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/layout_rounded"
android:layout_marginRight="10px"
android:layout_marginLeft="10px"
android:layout_marginTop="30px"
android:layout_below="@id/linlaypay"
android:orientation="vertical"
android:padding="10dip" >
<ListView
android:id="@+id/rectran"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
</ListView>
</LinearLayout >
동적 제목 목록보기를 추가하는 데 사용되는 코드입니다
문제는 emty 텍스트보기가 "header view"텍스트없이 listview에 추가된다는 것입니다. 왜 내가 놓친 거니?