Android Resource Get getStringArray(int arrayId)

Here you can find the source of getStringArray(int arrayId)

Description

Get a string array by its ID in the resources.

Parameter

Parameter Description
arrayId The ID of the string array in the resources.

Return

An array of String taken from the resources files.

Declaration

public static String[] getStringArray(int arrayId) 

Method Source Code

//package com.java2s;

import android.content.res.Resources;

public class Main {
    /**//from   w  w w . j av a  2 s. c o  m
     * The resources of the Android application.
     */
    private static Resources resources;

    /**
     * Get a string array by its ID in the resources.
     * 
     * @param arrayId
     *       The ID of the string array in the resources.
     * 
     * @return
     *       An array of String taken from the resources files.
     */
    public static String[] getStringArray(int arrayId) {
        return resources.getStringArray(arrayId);
    }
}

Related

  1. getProperties(String name, Context context)
  2. appendRes(StringBuilder sb, Resources res, int resId)