Java Code Examples for com.android.ide.common.resources.configuration.FolderConfiguration#setKeyboardStateQualifier()

The following examples show how to use com.android.ide.common.resources.configuration.FolderConfiguration#setKeyboardStateQualifier() . 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: ConfigGenerator.java    From NBANDROID-V2 with Apache License 2.0 5 votes vote down vote up
public FolderConfiguration getFolderConfig() {
    FolderConfiguration config = new FolderConfiguration();
    // config.createDefault();
    config.setDensityQualifier(new DensityQualifier(mDensity));
    config.setNavigationMethodQualifier(new NavigationMethodQualifier(mNavigation));
    if (mScreenWidth > mScreenHeight) {
        config.setScreenDimensionQualifier(new ScreenDimensionQualifier(mScreenWidth,
                mScreenHeight));
    } else {
        config.setScreenDimensionQualifier(new ScreenDimensionQualifier(mScreenHeight,
                mScreenWidth));
    }
    config.setScreenRatioQualifier(new ScreenRatioQualifier(mRatio));
    config.setScreenSizeQualifier(new ScreenSizeQualifier(mSize));
    config.setTextInputMethodQualifier(new TextInputMethodQualifier(mKeyboard));
    config.setTouchTypeQualifier(new TouchScreenQualifier(mTouchScreen));
    config.setKeyboardStateQualifier(new KeyboardStateQualifier(mKeyboardState));
    config.setScreenOrientationQualifier(new ScreenOrientationQualifier(mOrientation));

    config.updateScreenWidthAndHeight();

    // some default qualifiers.
    config.setUiModeQualifier(new UiModeQualifier(UiMode.NORMAL));
    config.setNightModeQualifier(new NightModeQualifier(NightMode.NOTNIGHT));
    config.setCountryCodeQualifier(new CountryCodeQualifier());
    config.setLayoutDirectionQualifier(new LayoutDirectionQualifier());
    config.setNetworkCodeQualifier(new NetworkCodeQualifier());
    config.setLocaleQualifier(new LocaleQualifier());
    config.setVersionQualifier(new VersionQualifier(28));
    return config;
}