Code example for Activity

Methods: getResources

0
        void iconPicked(int requestCode, int resultCode, Intent in);
    } 
 
    public IconPicker(Activity parent, OnIconPickListener listener) {
        mParent = parent;
        mResources = parent.getResources();
        mIconListener = listener;
    } 
 
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        mIconListener.iconPicked(requestCode, resultCode, data);
    } 
 
    public void pickIcon(final int fragmentId, final File image) {
        Intent iconPackIntent = new Intent(ICON_ACTION);
        ComponentName component = iconPackIntent.resolveActivity(mParent.getPackageManager());
 
        String[] items = new String[component != null ? 3 : 2];
        items[0] = mResources.getString(R.string.icon_picker_system_icons_title);
        items[1] = mResources.getString(R.string.icon_picker_gallery_title);
        if (component != null) {