Code example for TypedArray

Methods: getDrawable

0
            return labels.length;
        } 
 
        @Override 
        public Object getItem(int position) {
            return icons.getDrawable(position);
        } 
 
        public String getItemReference(int position) {
            String name = icons.getString(position);
            int separatorIndex = name.lastIndexOf(File.separator);
            int periodIndex = name.lastIndexOf('.');
            return name.substring(separatorIndex + 1, periodIndex);
        } 
 
        @Override 
        public long getItemId(int position) {
            return 0; 
        } 
 
        @Override