如何在图像视图上使布局透明



如何在Android图像视图上显示透明布局?

我有一个图像视图的线性布局,都在一个布局。我希望线性布局在图像视图上是透明的。我们能做到吗?

使用此属性:

android:background="@android:color/transparent"
// "image transparent programmatically android"    

float alpha_first = 0.2f;
    float alpha_second = 1.0f;
        AlphaAnimation alphadp = new AlphaAnimation(alpha_second, alpha_first);
            switch (v.getId()) {
            case R.id.disable_deactivate_pic:
            ImageButton disable_button =(ImageButton)findViewById(R.id.disable_deactivate_pic);
                    if (!flag) {
                        disable_button.setImageResource(R.drawable.enable_active);
                        linearLayout_for_picture = (LinearLayout) findViewById(R.id.linearlayout_imageView_pic);
                    alphadp.setFillAfter(true);
                    linearLayout_for_picture.startAnimation(alphadp);
                    flag=true;
                    }
            else {
                        disable_button.setImageResource(R.drawable.disable_active);
                        alphadp.setFillAfter(false);
                        linearLayout_for_picture.startAnimation(alphadp);
                        flag=false;
                    }
                break;




      [1]: https://i.stack.imgur.com/A0V2V.png