SimpleAdatper adapter;
adapter.setViewBinder(new SimpleAdapter.ViewBinder() {
@Override
public boolean setViewValue(View view, final Object data, String textRepresentation){
if (view.getId() == R.id.langtext) {
RadioButton b=(RadioButton) view;
b.setText((String)data);
b.setOnCheckedChangeListener(new OnCheckedChangeListener() {
public void onCheckedChanged(CompoundButton cb,
boolean isChecked) {
if (cb.isChecked()) {
Toast.makeText(
EditItemActivity.this,
"checked "
+ (String)data,
Toast.LENGTH_SHORT).show();
}
}
});
return true;
}
return false;
}
}
);
good one..........
ReplyDelete