0
我有ListView
與Imagebuttons
和EditText
。我怎樣才能按下按鈕,並保存在按鈕行上的EditText
我在onClick
內創建了哪些代碼?保存EditText與按鈕稍後調用
public View getView(int position, View convertView, ViewGroup parent) {
View linha = mInflater.inflate(R.layout.suport_activity, parent, false);
ImageButton ib = (ImageButton) convertView.findViewById(R.id.image_adicionar);
ib.setImageDrawable(getResources().getDrawable(R.drawable.add_car));
ImageButton carrinhoButton = (ImageButton) linha.findViewById(R.id.image_adicionar);
carrinhoButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MainActivity.class, CarrinhoActivity.class);
}
});
}
請張貼列表項的XML – humazed