XMLのリストビューと一緒にボタンがあります
ボタンは新しい連絡先用で、リストは連絡先リスト用です。1.ArrayAdapter / OnListItemの使用方法このリストビューをクリックしますか?
setListAdapter(new ArrayAdapter<String>(Contacts.this, R.id.ListView));
この宣言は正しいですか?
2.この方法は正しいですか?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<Button
android:id="@+id/bAddContact"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="ADD CONTACT" />
<ListView
android:id="@+id/ListView"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>
</LinearLayout>