私はAndroidに少し慣れていないので、これらのカスタムリストアダプターを理解しようとしています。したがって、BaseListActivityを拡張するアクティビティと次のような関数があります。
public void inflate(){
    ArrayList<String> words = new ArrayList<String>();
    orders.add("hello");
    orders.add("world");
    wordsList = (ListView) findViewById(R.id.list);
    WordsAdapter adapter = new WordsAdapter(this, R.layout.single_word_container_item,words);
    wordsList.setAdapter(adapter);
次に、カスタムWordsAdapterを次のように実装します。
public class WordsAdapter extends ArrayAdapter<String>{
    public Context context;
    public ArrayList<String> _words;
    //not sure the purpose of 'a' here
    public WordsAdapter(Context context, int a, ArrayList<String> words) {
        super(context, a, words);
        _words = words;
        this.context = context;
    }
    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        View v = inflater.inflate(R.layout.single_word_container_item, null);
        TextView wordName = (TextView) findViewById(R.id.wordName);
        if(!_words.isEmpty()){
            wordName.setText(_word.remove(0));
        }
        return v;
    }
}
ログからわかることは、getViewが呼び出されることはないということです。'single_word_container_item'は、複数回膨らませたいレイアウトのxmlファイルです。プロセス全体についてはよくわかりません。リストビューにアダプターを設定し、そのアダプターで毎回実際に表示されるものを表示するようになっていると思いました。ここで何が間違っているのでしょうか。現在、アダプタを設定するとnullポインタ例外が発生しますが、以前は何も表示されませんでした。ログは、WordsAdapterコンストラクターに入っているが、その後死んでいることを示しています。アドバイスをよろしくお願いします。
編集:それで、私のxmlでリストビューを識別するのに何か問題があるようです。
使用する場合:
ListView
android:id="@+id/android:list" OR android:id="@id/android:list"
android:layout_width="match_parent"
android:layout_height="wrap_content" 
ListView
使用すると、エラーはnullポインタ例外になります
しかし、それを次のように定義すると:
ListView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content" 
ListView
エラーが発生します:07-15 19:18:50.240:E / AndroidRuntime(29842):原因:java.lang.RuntimeException:コンテンツにはid属性が「android.R.id.list」であるListViewが必要です
編集:明らかに、listactivityを拡張してsetcontentview()を呼び出すことはできません。リストビューの上にビューが必要なので、リストアクティビティを拡張するのではなく、setcontentviewを呼び出して、そのIDでリストを参照します。
今私のエラーは次のとおりです。
java.lang.IllegalStateException:アダプターの内容は変更されましたが、ListViewは通知を受信しませんでした。アダプタのコンテンツがバックグラウンドスレッドからではなく、UIスレッドからのみ変更されていることを確認してください。
setAdapter()の後にadapter.notifyDataSetChanged()を呼び出そうとしましたが、機能しなかったようです。私はそれをどこか別の場所と呼ぶことになっていますか?