-1
我想創建一個像這樣的android屏幕 - 背景圖像褪色,並具有線性佈局,使圖像褪色。Android:創建褪色背景圖像
我想創建一個像這樣的android屏幕 - 背景圖像褪色,並具有線性佈局,使圖像褪色。Android:創建褪色背景圖像
這不是褪色的圖像,而是模糊的圖像。 更改alpha將會使圖像褪色而不會模糊它。
This可能有助於
這基本上是一個模糊圖像背景。您可以使用Photoshop等工具添加模糊效果,或者如果您正在尋找動態模糊效果,則可以使用StackBlur庫。
只需使用要模糊圖像初始化,
_stackBlurManager = new StackBlurManager(getBitmapFromAsset(this, "yourFile.png"));
,並設置模糊半徑,
_stackBlurManager.process(progress*5);
,然後設置模糊爲您的佈局或ImageView
背景。
_imageView.setImageBitmap(_stackBlurManager.returnBlurredImage());
給'image'爲'background'爲'ViewGroup'和使用'alpha' –
製作圖片作爲背景,以您的佈局設置其不透明度,並賦予其alpha屬性,它會工作 –
沒有,alpha將不起作用 – pskink