Code example for Configuration

0
            locale = new Locale(language.substring(0, 2), language.substring(3));
        } else { 
            locale = new Locale(language);
        } 
 
        Configuration config = new Configuration();
        config.locale = locale;
        Resources resources = context.getResources();
        resources.updateConfiguration(config, resources.getDisplayMetrics());
    } 
 
 
    /** 
     * Base activities need to implement this interface. 
     * 
     * <p>The implementing class simply has to call through to the implementation of these methods 
     * in {@link K9ActivityCommon}.</p> 
     */ 
    public interface K9ActivityMagic { 
        void setupGestureDetector(OnSwipeGestureListener listener);
    }