Example usage for android.content.res Configuration diff

List of usage examples for android.content.res Configuration diff

Introduction

In this page you can find the example usage for android.content.res Configuration diff.

Prototype

public int diff(Configuration delta) 

Source Link

Document

Return a bit mask of the differences between this Configuration object and the given one.

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 w  w  .j  av a  2 s.  c om*/
    return super.onSmallAppConfigurationChanged(newConfig);
}