I have a code :
Using java Syntax Highlighting
- //display edit text for updating begin
- EditText Ed_id = new EditText(this);
- Ed_id.setInputType(InputType.TYPE_CLASS_TEXT);
- Ed_id.setTextColor(Color.GREEN);
- <span style="font-weight: bold">Ed_id.setText(String.valueOf(id));
- Ed_id.setTag(0);</span>
- Ed_id.setKeyListener(null);
- tr_update.addView(Ed_id);
- //listen to Bt_update click
- Bt_update.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- <span style="font-weight: bold">Long id_update = (Long) v.getTag(0);</span>
- <span style="font-weight: bold">db.updateMyList(id_update,</span> String.valueOf(v.getTag(1)), String.valueOf(v.getTag(2)));
- db.close();
- Toast toast = Toast.makeText(getApplicationContext(), " Item updated! ", Toast.LENGTH_SHORT);
- toast.show();
- }
Parsed in 0.012 seconds, using GeSHi 1.0.8.4
My question is :
How to pass the value from 'Ed_id.setTag(0);' into 'db.updateMyList(id_update, String.valueOf(v.getTag(1)), '
Any helps or suggestions will be appreciated,
Thanks