see the classes hirachy below, I was confused very much that why two isolated classes can exist in one java file.
I know the two classes have something to do with each other, but the problem is I do not clearly understand what exactly realationship between them.
Also, if you noticed that NewFileTask
extends TaskDialog.Task
not TaskDialog
, I can not understand what does that mean, and what does that used for? anyone can help? Any material or reference for me to understand will be appreciated. Thanks in advance!
class NewFileTask extends TaskDialog.Task {
public NewFileTask(String repoID, String parentDir,
String fileName, DataManager dataManager) {
@Override
protected void runTask() {
}
}
}
and next is the class exits in the same java file
public class NewFileDialog extends TaskDialog {
public void init(String repoID, String parentDir, Account account) {
}
@Override
protected View createDialogContentView(LayoutInflater inflater, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.dialog_new_file, null);
fileNameText = (EditText) view.findViewById(R.id.new_file_name);
if (savedInstanceState != null) {
//...
}
return view;
}
}
If you want to read the complete source code, please go here on github