I have a RelativeLayout that inflates just fine. I would like to add a solid color rectangle spanning the width of the layout at the top. I tried putting the following into my xml:
<view android:id="@+id/top_alert"
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_above="@+id/orders_gridview"
android:layout_alignParentTop="true"
android:background="@color/table_request_assistance"
android:visibility="visible"/>
Now, when I try to inflate my Layout I get a NullPointerException at LayoutInflater.createViewFromTag (line 715):
if (name.equals(TAG_1995)) {
name
is set earlier thusly:
if (name.equals("view")) {
name = attrs.getAttributeValue(null, "class");
}
Evidently there is no "class" attribute. How do I add that? I can't find anything close in http://schemas.android.com/apk/res/android. Should I add it? Is this the standard way to do this? It seems like it should be the simplest thing in the world.