Skip to content

Instantly share code, notes, and snippets.

@Eugeny
Created June 12, 2012 08:27
Show Gist options
  • Save Eugeny/2916155 to your computer and use it in GitHub Desktop.
Save Eugeny/2916155 to your computer and use it in GitHub Desktop.
public class EditChatActivity extends Activity {
...
private BaseAdapter adapter = new BaseAdapter() {
...
@Override
public View getView(int arg0, View reuse, ViewGroup arg2) {
...
vh.delete.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
AlertHelper.yesNo(EditChatActivity.this, R.string.remove_this_user_from_chat_,
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface arg0, int arg1) {
new APITask(EditChatActivity.this) {
@Override
public void process() throws APIProblem {
API.removeUserFromChat(EditChatActivity.this, chatId, u.UID);
}
@Override
public void onSuccess() {
update();
}
}.useLoader(findViewById(R.id.relative)).execute();
}
}, null);
}
});
...
}
...
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment