use of com.ichi2.libanki.Utils in project AnkiChinaAndroid by ankichinateam.
the class Collection method nextID.
/**
* Utils ******************************************************************** ***************************
*/
public int nextID(String type) {
type = "next" + Character.toUpperCase(type.charAt(0)) + type.substring(1);
int id;
try {
id = mConf.getInt(type);
} catch (JSONException e) {
id = 1;
}
mConf.put(type, id + 1);
return id;
}
use of com.ichi2.libanki.Utils in project Anki-Android by ankidroid.
the class Collection method nextID.
/**
* Utils ******************************************************************** ***************************
*/
public int nextID(String type) {
type = "next" + Character.toUpperCase(type.charAt(0)) + type.substring(1);
int id;
try {
id = get_config_int(type);
} catch (JSONException e) {
Timber.w(e);
id = 1;
}
set_config(type, id + 1);
return id;
}
Aggregations