private void handleOK(EditText input, EditText inputTitle) { String novel = input.getText().toString(); String title = inputTitle.getText().toString(); if (novel != null && novel.length() > 0 && inputTitle != null && inputTitle.length() > 0) { PageModel temp = new PageModel(); temp.setPage(novel); temp.setTitle(title); temp.setType(PageModel.TYPE_NOVEL); temp.setParent("Main_Page"); executeAddTask(temp); } else { Toast.makeText(getSherlockActivity(), "Empty Input", Toast.LENGTH_LONG).show(); } }