If inputClass
EditText is inside Dialog then use AlertDialog
layout View to initialize as:
build = new AlertDialog.Builder(MainActivity.this);
LayoutInflater inflater = LayoutInflater.from(MainActivity.this);
View alertview = inflater.inflate(R.layout.create_class_dialog, null);
/// initialize EditText here..
inputClass=(EditText)alertview.findViewById(R.id.edittextid);
build.setView(alertview)
.setTitle("New Class Entry")
....your code here...