Ipack
Home
Downloads
Creating An Ipack
App Developers

Accessing Ipack Icons

Letting the user pick an icon from all of the installed Ipacks is simple:


    	startActivityForResult( 
  			Intent.createChooser( 
   					new Intent( IpackKeys.Actions.ICON_SELECT ), 
    					"Choose An Ipack"
    			),
    			REQ_CODE_ICON_SELECT
 	);

You can add extras for ICON_SIZE, CELL_SIZE and GRID_BACK_COLOUR (see IpackKeys).

In your onActivityResult(), you'll receive an intent data containing a URI which you can then pass to an ImageView with setImageUri().

The result intent also contains the following extras:

net.dinglisch.android.ipack.extras.ICON_IDthe resource ID (specific to the particular Ipack chosen)
net.dinglisch.android.ipack.extras.ICON_NAMEthe resource entry name (also ipack-specific, corresponding to the filename res/drawable)
net.dinglisch.android.ipack.extras.ICON_LABELthe display-label specified by the Ipack creator, often defaults to the resource name

If you need more control over how the icon pack and icon selection takes place, or wish to query without user interaction or from a component other than an activity, there are low-level access methods too.