Java Code Examples for com.android.internal.util.XmlUtils#convertValueToList()

The following examples show how to use com.android.internal.util.XmlUtils#convertValueToList() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XmlBlock.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
public int getAttributeListValue(int idx,
        String[] options, int defaultValue) {
    int t = nativeGetAttributeDataType(mParseState, idx);
    int v = nativeGetAttributeData(mParseState, idx);
    if (t == TypedValue.TYPE_STRING) {
        return XmlUtils.convertValueToList(
            mStrings.get(v), options, defaultValue);
    }
    return v;
}
 
Example 2
Source File: XmlPullAttributes.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
public int getAttributeListValue(String namespace, String attribute,
        String[] options, int defaultValue) {
    return XmlUtils.convertValueToList(
        getAttributeValue(namespace, attribute), options, defaultValue);
}
 
Example 3
Source File: XmlPullAttributes.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
public int getAttributeListValue(int index,
        String[] options, int defaultValue) {
    return XmlUtils.convertValueToList(
        getAttributeValue(index), options, defaultValue);
}