This is what I’m trying to do:
I have a .png image as background for my TextView; The color of the text is white. To make the text easier to read, I’d like add a seme-opaque, black layer on top of my .png image.
This is what I’ve done so far:
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/aboutContent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:text="@string/aboutEN"
android:textColor="#FFFFFF"
android:background="@drawable/myimage"/>
I tried to add android:background=”@color/blackOpaque”>
But Eclipse complains that I’ve already got a background image. So I tried to change the transparency of my image file like this:
Drawable myimage = getResources().getDrawable(R.drawable.myimage);
myimage.setAlpha(50);
But nothing seems to happen at all.
What should I do? Thanks!
Thanks!
This saved my @$$!