Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.content.res.Resources;
import android.content.res.TypedArray;

public class Main {
    public static String[] getItemStrings(Resources res, int iconsRes) {
        if (iconsRes == 0)
            return null;
        TypedArray array = res.obtainTypedArray(iconsRes);
        int n = array.length();
        String ids[] = new String[n];
        for (int i = 0; i < n; ++i) {
            ids[i] = res.getString(array.getResourceId(i, 0));
        }
        array.recycle();
        return ids;
    }
}