I'm trying to set blur background image. Android studio projects are available. But I'm using eclipse. So any one help me to how to set blur image programmatically?
Asked
Active
Viewed 4.0k times
2 Answers
15
Use this to set your opacity
android:alpha="0.5"
OR
yourView.getBackground().setAlpha(100);

Ravindra Kushwaha
- 7,846
- 14
- 53
- 103

Syed Raza Mehdi
- 4,067
- 1
- 31
- 47
-
-
see this if it might be of any help http://stackoverflow.com/questions/2067955/fast-bitmap-blur-for-android-sdk – Syed Raza Mehdi Feb 03 '15 at 09:25
2
To set transparency level of the view to make it dim
View class have setAlpha(float alpha) method which is Added in API level 11.
So from API level 11 and after you can use that method in xml and class too.
Using xml android:alpha
set float value between 0 to 1
For before and after api level 11(for all) third party library is available for alpha and other things also.
NineOldAndroid
ViewHelper.setAlpha(View yourview,float alpha)
What else you can do to make image blure effect is, convert image to bitmap with blur/dim effect. check this

Community
- 1
- 1

user1140237
- 5,015
- 1
- 28
- 56