Code example for TypedArray

Methods: getString

0
        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 
        public View getView(int position, View convertView, ViewGroup parent) {
            View view = convertView;
            if (convertView == null) {
                view = View.inflate(mParent, android.R.layout.simple_list_item_1, null);