Search in sources :

Example 11 with DialogListener

use of com.mnnyang.gzuclassschedule.utils.DialogListener in project GzuClassSchedule by mnnyang.

the class CourseActivity method onLongClick.

@Override
public void onLongClick(final Course course, LinearLayout itemLayout) {
    DialogHelper dialogHelper = new DialogHelper();
    dialogHelper.showNormalDialog(this, getString(R.string.confirm_to_delete), "课程 【" + course.getName() + "】" + Constant.WEEK[course.getWeek()] + "第" + course.getNodes().get(0) + "节 " + "", new DialogListener() {

        @Override
        public void onPositive(DialogInterface dialog, int which) {
            super.onPositive(dialog, which);
            // delete
            mPresenter.deleteCourse(course.getCourseId());
        }
    });
}
Also used : DialogHelper(com.mnnyang.gzuclassschedule.utils.DialogHelper) DialogInterface(android.content.DialogInterface) DialogListener(com.mnnyang.gzuclassschedule.utils.DialogListener)

Aggregations

DialogInterface (android.content.DialogInterface)11 DialogHelper (com.mnnyang.gzuclassschedule.utils.DialogHelper)11 DialogListener (com.mnnyang.gzuclassschedule.utils.DialogListener)11 View (android.view.View)5 RadioGroup (android.widget.RadioGroup)4 AppCompatRadioButton (android.support.v7.widget.AppCompatRadioButton)3 Intent (android.content.Intent)2 RecyclerView (android.support.v7.widget.RecyclerView)2 EditText (android.widget.EditText)2 ScrollView (android.widget.ScrollView)2 WheelView (com.mnnyang.gzuclassschedule.custom.WheelView)2 ArrayList (java.util.ArrayList)2 HorizontalScrollView (android.widget.HorizontalScrollView)1