list.setOnItemLongClickListener(new OnItemLongClickListener() {
@Override
public boolean onItemLongClick(AdapterView<?> arg0, View arg1,
int arg2, long arg3) {
Cursor c = (Cursor)list.getItemAtPosition(arg2);
idIndex1=c.getString(SUMMARY_ID_COLUMN_INDEX);
final CharSequence[] items = {"Delete"};
AlertDialog.Builder item = new AlertDialog.Builder(mContext,AlertDialog.THEME_HOLO_LIGHT).setTitle(c.getString(1));
item.setItems(items, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int item) {
switch (item) {
case 0: {
doDeleteContact(idIndex1);
adapter.swapCursor(tmpCursor(idIndex1));
return;
}
}
}
}).create();
mPopupDlg=item.show();
return false;
}
});
protected void doDeleteContact(String id) {
mContext.startService(ContactSaveService.createDeleteContactIntent(this.mContext, id));
}
디비데이터를 지우는것을 서비스로 돌렸는데
디비데이터가 지워질때까지 다른작업을 할수없습니다.
서비스는 백그라운드에서 도는거니까
작업여부에 상관없이 다른작업을 할수있어야 할것같은데
(예를들면 스크롤 이나 activity 이동 )
먼가 잘못쓴것인지...
ㅠㅠㅠㅠㅠㅠㅠ