これに関する決定的な答えはどこにもありません。 ArrayAdapter.insert()は、指定された場所に新しいアイテムを挿入しますか..または..指定された場所の情報を置き換えますか?
2698 次
3 に答える
6
新しいアイテムを挿入します。以前に存在した項目は変更または消去されません。
于 2013-01-31T14:14:40.703 に答える
0
insert(T object, int index)
指定されたオブジェクトを配列内の指定されたインデックスに挿入します。その後、現在のアイテムには影響しませんindex
ドキュメントはこちら
于 2013-01-31T14:15:19.590 に答える
0
指定されたインデックスで既存のアイテムの間に新しいアイテムを挿入します。http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/1.6_r2/android/widget/ArrayAdapter.javaを参照してください。
さらに ArrayList<>.add() を呼び出します。
Inserts the specified element at the specified position in this list. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).
于 2013-01-31T14:15:30.027 に答える