. 리스트 뷰에 대한 설정
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke android:width="4dp" android:color="#FFFFFFFF" />
<padding android:left="7dp" android:top="7dp"
android:right="7dp" android:bottom="7dp" />
<corners android:radius="15dp" />
<solid android:color="#FFFFFFFF"/>
</shape>
, : 그리기 폴더
listview_border.xml 다음 hedser 위해 그
android:background="@drawable/listview_border"
, 레이아웃의 생성을 listviaw_header.xml 다음은 예이다 :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="128dp"
android:layout_height="wrap_content"
android:src="@drawable/contact_image_fr"
android:layout_marginLeft="10dp" />
</LinearLayout>
그런 다음 헤더를 설정하십시오.
ListView contact = (ListView) findViewById(R.id.contactListView);
View header = getLayoutInflater().inflate(R.layout.contact_listview_header, null);
contact.addHeaderView(header);
그게 전부입니다. Enjoy ...
이미지가 손상되었습니다. – CommonsWare
안녕하세요, 이상합니다. 스택에서 볼 수 있습니다. –
Android 디자인 가이드 라인 인용 : http://developer.android.com/design/patterns/pure-android.html "다른 플랫폼의 일반적인 패턴은 사용자가 드릴 할 수있게 해주는 광고 항목에 오른쪽 마우스를 가리키는 캐럿을 표시하는 것입니다 Android는 드릴 다운 광고 항목에 이러한 표시기를 사용하지 않으므로 플랫폼과의 일관성을 유지하고 사용자가 그 의미가 무엇인지 추측하지 못하게해야합니다. " – CommonsWare