• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package org.robolectric.android;
2 
3 import android.content.Context;
4 import android.util.AttributeSet;
5 import android.widget.LinearLayout;
6 import org.robolectric.R;
7 
8 public class CustomView extends LinearLayout {
9   public static final String ROBOLECTRIC_RES_URI = "http://schemas.android.com/apk/res/org.robolectric";
10   public static final String FAKE_URI = "http://example.com/fakens";
11 
12   public int attributeResourceValue;
13   public int namespacedResourceValue;
14 
CustomView(Context context, AttributeSet attrs)15   public CustomView(Context context, AttributeSet attrs) {
16     super(context, attrs);
17     inflate(context, R.layout.inner_merge, this);
18     attributeResourceValue = attrs.getAttributeResourceValue(ROBOLECTRIC_RES_URI, "message", -1);
19     namespacedResourceValue = attrs.getAttributeResourceValue(FAKE_URI, "message", -1);
20   }
21 }
22