Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.content.Context;

import java.util.ArrayList;
import java.util.Arrays;

public class Main {
    public static ArrayList<String> getStringList(Context context, int arrayId) {
        return new ArrayList<>(Arrays.asList(getStringArray(context, arrayId)));
    }

    public static String[] getStringArray(Context context, int arrayId) {
        return context.getResources().getStringArray(arrayId);
    }
}