进行android开发已经一段时间了,发现了一些对我个人来说比较奇怪的问题,在这里记录一下。
首先我的问题是这样的,我在首界面对其中布局中的一张图片做了设置透明度的处理,然后呢,我在其他界面同样用到这一张图片,但是,我发现自己在其他界面这张图片显示的竟然是被设置透明度后的样子。
第一个界面的代码:
topBar = (RelativeLayout)view.findViewById(R.id.layout_top111);
topBar.getBackground().setAlpha(0);
相应的xml布局:
<RelativeLayout
android:id="@+id/layout_top111"
android:layout_width="fill_parent"
android:layout_height="44dp"
android:background="@drawable/top"
android:orientation="horizontal"
android:visibility="visible"
>
<RelativeLayout
android:id="@+id/wode"
android