Android dashed line drawable potential ICS bug

The following is a dashed line, defined as a ShapeDrawable in XML:

<shape
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="line">

    <size
        android:height="2dp"
        android:width="700dp" />

    <stroke
        android:width="1dp"
        android:color="@android:color/black"
        android:dashWidth="1dp"
        android:dashGap="2dp" />

</shape>

This will draw a nice dotted line on several Gingerbread phones. On the Galaxy Nexus however, the dashes appear to be ignored and the shape is drawn as a contiguous line. Even more curious, an emulator running ICS will render it correctly with the dashes, it’s just the physical device screwing up.

  • Custom Square LinearLayout. How?
  • Android notification large icon, is there a way to remove the smaller icon on the bottom right?
  • How to install icon pack on custom launcher?
  • Using cookies with Android volley library
  • Custom Action View can't be clicked
  • Android Studio error installing Gradle
  • Am I missing something obvious? Or is this really a bug with Android 4.0? The line is used in several places. Here is an example ImageView:

    <ImageView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="@dimen/observation_observe_side_margin"
        android:layout_marginRight="@dimen/observation_observe_side_margin"
        android:layout_marginTop="16dp"
        android:contentDescription="@string/dotted_line_description"
        android:src="@drawable/dotted_line" />
    

    Related posts:

    Set span for items in GridLayoutManager using SpanSizeLookup
    Invalid Gradle JDK configuration found?
    How to use a contract class in android?
    How to make a GridLayout fit screen size
    Two Android applications with the same user ID
    Android AlarmManager in a Broadcastreceiver
    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.