byte[] poss = prefs.getByteArray(POSITIONS + i, null);
if (cols != null && poss != null) {
try {
Color[] colors = deserializeColors(cols);
float[] posisitons = deserializePositions(poss);
LinearGradient linearGradient = new LinearGradient(colors, posisitons);
gradients.add(linearGradient);
} catch (Exception e) {
e.printStackTrace();
}
} else {