// 1)
/**
*
* @param Url : direct link that can be downloading theme.res file
* @param name : name theme file to saving that in FileSystemStorage e.g theme.res
* @return path in FileSystemStorage for theme downloaded
*/
public static String downloadTheme(String Url,String name,boolean progress){
String pathTheme =FileSystemStorage.getInstance().getAppHomePath()+name;
Util.downloadUrlToFile(Url, pathTheme, progress);
return pathTheme;
}
// 2)
public static Resources initFirstTheme(String pathTheme) {
try {
Resources theme = getTheme(pathTheme);
UIManager.getInstance().setThemeProps(theme.getTheme(theme.getThemeResourceNames()[0]));
Resources.setGlobalResources(theme);
return theme;
} catch(Exception e){
Log.e(e);
}
return null;
}
// 3)
/**
resource = FileSystemStorage.getInstance().openInputStream(pathTheme);