List of usage examples for android.util Config clone
@HotSpotIntrinsicCandidate protected native Object clone() throws CloneNotSupportedException;
From source file:android.support.v7.widget.BaseLinearLayoutManagerTest.java
protected static List<Config> addConfigVariation(List<Config> base, String fieldName, Object... variations) throws CloneNotSupportedException, NoSuchFieldException, IllegalAccessException { List<Config> newConfigs = new ArrayList<Config>(); Field field = Config.class.getDeclaredField(fieldName); for (Config config : base) { for (Object variation : variations) { Config newConfig = (Config) config.clone(); field.set(newConfig, variation); newConfigs.add(newConfig);//from ww w . j a v a 2s .co m } } return newConfigs; }