I'm very new to android and I'm following this example.
The code says we need to do these steps to get an dialog box:
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
// 2. Chain together various setter methods to set the dialog characteristics
builder.setMessage(R.string.dialog_message)
.setTitle(R.string.dialog_title);
// 3. Get the AlertDialog from create()
AlertDialog dialog = builder.create();
But where does the getActivity()
method is defined?
I can't find that method.