Java Code Examples for com.android.resources.KeyboardState#SOFT

The following examples show how to use com.android.resources.KeyboardState#SOFT . 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: KeyboardStateQualifier.java    From java-n-IDE-for-Android with Apache License 2.0 6 votes vote down vote up
@Override
public boolean isMatchFor(ResourceQualifier qualifier) {
    if (qualifier instanceof KeyboardStateQualifier) {
        KeyboardStateQualifier referenceQualifier = (KeyboardStateQualifier)qualifier;

        // special case where EXPOSED can be used for SOFT
        if (referenceQualifier.mValue == KeyboardState.SOFT &&
                mValue == KeyboardState.EXPOSED) {
            return true;
        }

        return referenceQualifier.mValue == mValue;
    }

    return false;
}
 
Example 2
Source File: KeyboardStateQualifier.java    From java-n-IDE-for-Android with Apache License 2.0 6 votes vote down vote up
@Override
public boolean isBetterMatchThan(ResourceQualifier compareTo, ResourceQualifier reference) {
    if (compareTo == null) {
        return true;
    }

    KeyboardStateQualifier compareQualifier = (KeyboardStateQualifier)compareTo;
    KeyboardStateQualifier referenceQualifier = (KeyboardStateQualifier)reference;

    if (referenceQualifier.mValue == KeyboardState.SOFT) { // only case where there could be a
                                                           // better qualifier
        // only return true if it's a better value.
        if (compareQualifier.mValue == KeyboardState.EXPOSED && mValue == KeyboardState.SOFT) {
            return true;
        }
    }

    return false;
}
 
Example 3
Source File: KeyboardStateQualifier.java    From javaide with GNU General Public License v3.0 6 votes vote down vote up
@Override
public boolean isMatchFor(ResourceQualifier qualifier) {
    if (qualifier instanceof KeyboardStateQualifier) {
        KeyboardStateQualifier referenceQualifier = (KeyboardStateQualifier)qualifier;

        // special case where EXPOSED can be used for SOFT
        if (referenceQualifier.mValue == KeyboardState.SOFT &&
                mValue == KeyboardState.EXPOSED) {
            return true;
        }

        return referenceQualifier.mValue == mValue;
    }

    return false;
}
 
Example 4
Source File: KeyboardStateQualifier.java    From javaide with GNU General Public License v3.0 6 votes vote down vote up
@Override
public boolean isBetterMatchThan(ResourceQualifier compareTo, ResourceQualifier reference) {
    if (compareTo == null) {
        return true;
    }

    KeyboardStateQualifier compareQualifier = (KeyboardStateQualifier)compareTo;
    KeyboardStateQualifier referenceQualifier = (KeyboardStateQualifier)reference;

    if (referenceQualifier.mValue == KeyboardState.SOFT) { // only case where there could be a
                                                           // better qualifier
        // only return true if it's a better value.
        if (compareQualifier.mValue == KeyboardState.EXPOSED && mValue == KeyboardState.SOFT) {
            return true;
        }
    }

    return false;
}