Code example for ListFragment

Methods: registerForContextMenu

0
        mListView = (ListView) view.findViewById(android.R.id.list);
        mListView
                .setAdapter(mNotificationListAdapter = new NotificationListAdapter(
                        mContext, null, mLayoutInflater, SessionKeeper
                        .getProfileData().getId())); 
        registerForContextMenu(mListView);
 
    } 
 
    @Override 
    public void reload() { 
 
        new AsyncRefresh().execute(mSharedPreferences.getString(
                Constants.SP_BL_PROFILE_CHECKSUM, "")); 
 
    } 
 
    @Override 
    public Menu prepareOptionsMenu(Menu menu) {
        return menu;
    }