Code example for DialogFragment

Methods: getActivity, onResume

0
        log("Created"); 
    } 
 
    @Override 
    public void onResume() { 
        super.onResume(); 
        if (mPrlAdapter == null) {
            mPrlAdapter = new PrlAdapter(getActivity(), getPrlFiles());
        } 
        mPrlAdapter.clear();
        mPrlAdapter.addAll(getPrlFiles());
        mPrlAdapter.notifyDataSetChanged();
    } 
 
    @Override 
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        log("onCreateDialog called"); 
        mPrlAdapter = new PrlAdapter(getActivity(), getPrlFiles());
 
        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
        builder.setTitle(R.string.select_prl);