Methods Summary |
---|
public static java.util.List | getResourceDirs(int platformVersion)
// Special case the most used scenario.
if (platformVersion == 0) {
return sDefaultResourceDir;
}
List<String> list = new ArrayList<String>(4);
// Gingerbread - uses custom battery and wifi icons.
if (platformVersion <= GINGERBREAD) {
list.add(GINGERBREAD_DIR);
}
// ICS - JellyBean uses custom battery, wifi.
if (platformVersion <= JELLY_BEAN_MR2) {
list.add(JELLYBEAN_DIR);
}
// KitKat - uses custom wifi and nav icons.
if (platformVersion <= KITKAT) {
list.add(KITKAT_DIR);
}
list.add(DEFAULT_RESOURCE_DIR);
return Collections.unmodifiableList(list);
|
public static int | getStatusBarColor(int platformVersion)
// return white for froyo and earlier; black otherwise.
return platformVersion == 0 || platformVersion >= GINGERBREAD ? BLACK : WHITE;
|
public static java.lang.String | getTime(int platformVersion)
if (platformVersion == 0) {
return "5:00";
}
if (platformVersion < GINGERBREAD) {
return "2:20";
}
if (platformVersion < ICE_CREAM_SANDWICH) {
return "2:30";
}
if (platformVersion < JELLY_BEAN) {
return "4:00";
}
if (platformVersion < KITKAT) {
return "4:30";
}
if (platformVersion <= KITKAT_WATCH) {
return "4:40";
}
// Should never happen.
return "4:04";
|
public static int | getTimeColor(int platformVersion)
if (platformVersion == 0 || platformVersion >= KITKAT ||
platformVersion > FROYO && platformVersion < HONEYCOMB) {
// Gingerbread and KitKat onwards.
return WHITE;
}
// Black for froyo.
if (platformVersion < GINGERBREAD) {
return BLACK;
} else if (platformVersion < KITKAT) {
// Honeycomb to JB-mr2: Holo blue light.
return 0xff33b5e5;
}
// Should never happen.
return WHITE;
|
public static java.lang.String | getWifiIconType(int platformVersion)
return platformVersion == 0 ? "xml" : "png";
|
public static boolean | showOnScreenNavBar(int platformVersion)
return platformVersion == 0 || platformVersion >= ICE_CREAM_SANDWICH;
|