Java – setAlpha viewed programmatically

setAlpha viewed programmatically… here is a solution to the problem.

setAlpha viewed programmatically

I see in the Android documentation that there is a setAlpha API Level 1. I have a View and I tried using setAlpha(float) on the View, but the compiler says no such method exists. Am I missing something?

Solution

As far as I know, http://developer.android.com/reference/android/view/View.html#setAlpha (float) is only supported at API level 11, not 1.

If you want to use this, you have to add something similar to your list

<uses-sdk android:minSdkVersion="11"/>

Related Problems and Solutions