Example usage for android.content.res Configuration setToDefaults

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

Introduction

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

Prototype

public void setToDefaults() 

Source Link

Document

Set this object to the system defaults.

Usage

From source file:com.anykey.balala.activity.BaseActivity.java

@Override
public Resources getResources() {
    Resources res = super.getResources();
    Configuration config = new Configuration();
    config.setToDefaults();
    res.updateConfiguration(config, res.getDisplayMetrics());
    return res;//from ww w . j a  va 2  s  .  c  o  m
}