Home | History | Annotate | Download | only in shadows
      1 package com.xtremelabs.robolectric.shadows;
      2 
      3 import java.util.Locale;
      4 
      5 import android.content.res.Configuration;
      6 
      7 import com.xtremelabs.robolectric.internal.Implementation;
      8 import com.xtremelabs.robolectric.internal.Implements;
      9 import com.xtremelabs.robolectric.internal.RealObject;
     10 
     11 @Implements(Configuration.class)
     12 public class ShadowConfiguration {
     13 
     14     @RealObject
     15     private Configuration realConfiguration;
     16 
     17     public int screenLayout;
     18     public int touchscreen;
     19     public int orientation;
     20 
     21     @Implementation
     22     public void setToDefaults() {
     23         realConfiguration.screenLayout = Configuration.SCREENLAYOUT_LONG_NO |
     24                 Configuration.SCREENLAYOUT_SIZE_NORMAL;
     25     }
     26 
     27     public void setLocale( Locale l ) {
     28     	realConfiguration.locale = l;
     29     }
     30 }
     31