我添加到Android Studio項目中的每個圖片資源都會添加0.5的不透明度,我無法使用setAlpha方法以編程方式更改其不透明度。Android Image Asset Opacity
我將它作爲操作欄和選項卡圖標類型添加爲資產類型:圖像。
其他人有這個問題嗎?不透明度爲1的資產對於我正在嘗試做的事非常重要。
profileButton = (ImageView) findViewById(R.id.profileButton);
profileButton.setAlpha(1f);
解決:Android沒有任何關係。抱歉。
請添加您使用setAlpha方法的代碼。 – smora
profileButton =(ImageView)findViewById(R.id.profileButton); profileButton.setAlpha(1F); – Matt