use of com.lingtuan.firefly.util.MyDialogFragment in project SmartMesh_Android by SmartMeshFoundation.
the class MsgTransListUI method onItemLongClick.
@Override
public boolean onItemLongClick(AdapterView<?> parent, View view, final int position, long id) {
MyDialogFragment mdf = new MyDialogFragment(MyDialogFragment.DIALOG_LIST, R.array.delete_trans_array);
mdf.setItemClickCallback(new MyDialogFragment.ItemClickCallback() {
@Override
public void itemClickCallback(int which) {
ChatMsg msg = mList.get(position);
FinalUserDataBase.getInstance().deleteChatEventTransByMessageId(msg.getMessageId());
MyToast.showToast(MsgTransListUI.this, getString(R.string.delete_success));
mList.remove(position);
mAdapter.updateList(mList);
}
});
mdf.show(getSupportFragmentManager(), "mdf");
return true;
}
use of com.lingtuan.firefly.util.MyDialogFragment in project SmartMesh_Android by SmartMeshFoundation.
the class MainContactFragmentUI method ShowDeleteDialog.
/**
* Remove buddy bounced
*/
private void ShowDeleteDialog(final String uid, final boolean isOfflineFriend) {
MyDialogFragment mdf = new MyDialogFragment(MyDialogFragment.DIALOG_LIST, R.array.delete_friend_array);
mdf.setItemClickCallback(new MyDialogFragment.ItemClickCallback() {
@Override
public void itemClickCallback(int which) {
deleteFriends(uid, isOfflineFriend);
}
});
mdf.show(getFragmentManager(), "mdf");
}
use of com.lingtuan.firefly.util.MyDialogFragment in project SmartMesh_Android by SmartMeshFoundation.
the class MainFoundFragmentUI method selectGenderMethod.
/**
* Screening of gender box
*/
private void selectGenderMethod() {
MyDialogFragment mdf = new MyDialogFragment(MyDialogFragment.DIALOG_LIST, R.array.sex_list_all);
mdf.setItemClickCallback(new MyDialogFragment.ItemClickCallback() {
@Override
public void itemClickCallback(int which) {
if (which == 0) {
// male
updateDatas("1");
} else if (which == 1) {
// female
updateDatas("2");
} else {
// all
if (mDatas != null) {
mAdapter.resetSource(mDatas);
}
}
}
});
mdf.show(getFragmentManager(), "mdf");
}
Aggregations