I placed a TextView on an ImageView in a FrameLayout. I’ve tried various combinations of android:background for the TextView but always get a see-through grey background on it. I’d like a transparent background. The android:background attribute seems to be ignored.
<HorizontalScrollView
android:id="@+id/categories_horizontal_scrollview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="25dip">
<LinearLayout
android:id="@+id/categories_linear_layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/photos_imageview"
android:scaleType="center"
android:src="@drawable/photos_ipad" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/photos_text"
android:layout_marginBottom="10dip"
android:layout_gravity="center_horizontal|bottom"
android:padding="3dip"
android:background="#00000000"
android:textColor="#ffffffff"
android:textSize="20dip"
/>
</FrameLayout>
.
.
As Brayden pointed out, there was a problem in the layout. I ended up putting the ImageView and TextView into a FrameLayout as a single resource, then adding that dynamically where needed.