Home | History | Annotate | Download | only in shadows
      1 package com.xtremelabs.robolectric.shadows;
      2 
      3 import android.content.res.Resources;
      4 import android.content.res.TypedArray;
      5 import com.xtremelabs.robolectric.Robolectric;
      6 import com.xtremelabs.robolectric.internal.Implementation;
      7 import com.xtremelabs.robolectric.internal.Implements;
      8 
      9 @SuppressWarnings({"UnusedDeclaration"})
     10 @Implements(TypedArray.class)
     11 public class ShadowTypedArray {
     12     @Implementation
     13     public Resources getResources() {
     14         return Robolectric.application.getResources();
     15     }
     16 
     17     @Implementation
     18     public boolean getBoolean(int index, boolean defValue) {
     19         return defValue;
     20     }
     21 
     22     @Implementation
     23     public float getFloat(int index, float defValue) {
     24         return defValue;
     25     }
     26 
     27     @Implementation
     28     public int getInt(int index, int defValue) {
     29         return defValue;
     30     }
     31 
     32     @Implementation
     33     public int getInteger(int index, int defValue) {
     34         return defValue;
     35     }
     36 
     37     @Implementation
     38     public float getDimension(int index, float defValue) {
     39         return defValue;
     40     }
     41 
     42     @Implementation
     43     public int getDimensionPixelOffset(int index, int defValue) {
     44         return defValue;
     45     }
     46 
     47     @Implementation
     48     public int getDimensionPixelSize(int index, int defValue) {
     49         return defValue;
     50     }
     51 
     52     @Implementation
     53     public int getLayoutDimension(int index, int defValue) {
     54         return defValue;
     55     }
     56 
     57     @Implementation
     58     public int getResourceId(int index, int defValue) {
     59         return defValue;
     60     }
     61 }
     62