Example usage for android.content.pm ActivityInfo CONFIG_FONT_SCALE

List of usage examples for android.content.pm ActivityInfo CONFIG_FONT_SCALE

Introduction

In this page you can find the example usage for android.content.pm ActivityInfo CONFIG_FONT_SCALE.

Prototype

int CONFIG_FONT_SCALE

To view the source code for android.content.pm ActivityInfo CONFIG_FONT_SCALE.

Click Source Link

Document

Bit in #configChanges that indicates that the activity can itself handle changes to the font scaling factor.

Usage

From source file:com.pranavpandey.smallapp.SmallApp.java

@Override
protected boolean onSmallAppConfigurationChanged(Configuration newConfig) {
    int diff = newConfig.diff(mConfig);
    mConfig = new Configuration(getResources().getConfiguration());

    if ((diff & ActivityInfo.CONFIG_ORIENTATION | ActivityInfo.CONFIG_FONT_SCALE
            | ActivityInfo.CONFIG_SCREEN_SIZE | ActivityInfo.CONFIG_KEYBOARD) != 0) {
        return true;
    }/*from  w ww .j  a v a2  s . co m*/
    return super.onSmallAppConfigurationChanged(newConfig);
}