本文整理汇总了Java中com.duanze.litepreferences.parser.ParsePrefsXml类的典型用法代码示例。如果您正苦于以下问题:Java ParsePrefsXml类的具体用法?Java ParsePrefsXml怎么用?Java ParsePrefsXml使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ParsePrefsXml类属于com.duanze.litepreferences.parser包,在下文中一共展示了ParsePrefsXml类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initFromXmlLite
import com.duanze.litepreferences.parser.ParsePrefsXml; //导入依赖的package包/类
/**
* Must call this method before use LitePrefs.
* Pass the **Application Context** or **Main Activity**
* as parameter to avoid your activity
* cannot be recycled by GC.
*
* @param context should pass a **Application Context** or **Main Activity**
* @param res the xml file resource id
* @see #initFromMapLite(Context, String, Map)
*/
@Override
public void initFromXmlLite(Context context, int res) throws IOException, XmlPullParserException {
mContext = context;
mUtil = ParsePrefsXml.parse(context.getResources().getXml(res));
mUtil.init(context);
valid = true;
}
示例2: initFromXmlLite
import com.duanze.litepreferences.parser.ParsePrefsXml; //导入依赖的package包/类
/**
* Must call this method before use LitePrefs.
* Pass the **Application Context** or **Main Activity**
* as parameter to avoid your activity
* cannot be recycled by GC.
*
* @param context should pass a **Application Context** or **Main Activity**
* @param res the xml file resource id
* @see #initFromMapLite(Context, String, Map)
*/
public void initFromXmlLite(Context context, int res) throws IOException, XmlPullParserException {
mContext = context;
mUtil = ParsePrefsXml.parse(context.getResources().getXml(res));
mUtil.init(context);
valid = true;
}