Load several Strings from resource - Android android.content.res

Android examples for android.content.res:Resources

Description

Load several Strings from resource

Demo Code

import android.content.Context;

public class Main{

    public static String getStrings(Context c, int... id) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < id.length; i++)
            sb.append(c.getResources().getString(id[i]) + " ");
        return sb.toString();
    }//from  w  w w . j  a v  a  2  s . c o m

}

Related Tutorials