您好我有自定義列表視圖與textview和edittext.When我點擊添加行按鈕顯示在這裏列表視圖中的一行輸入文本,然後再次單擊添加按鈕顯示另一行像這樣finaly點擊保存按鈕同時獲得textview和從listview編輯文本值。Listview Cellinsertion android
我已經嘗試過
button = (Button) findViewById(R.id.button);
Movi = new String[] { "one", "two", "three", "four", "five", "six",
"seven", "eight", "nine" };
dataList = (ListView) findViewById(R.id.list);
adapter = new CustomAdapter(CustomListView.this, R.layout.list,
imageArry);
// add data in contact image adapter
button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if (itemCount < Movi.length) {
imageArry.add(new Item(itemCount, Movi, text));
dataList.setAdapter(adapter);
adapter.notifyDataSetChanged();
itemCount++;
}
}
});
下面我添加圖像
感謝您的回覆.... –