我正在使用从上到下的滑动抽屉。我在该滑动抽屉上有一个 100x100 的 ImageView / View 。在主屏幕上我有一个图像。我想使滑动抽屉上的 View 透明,以便我可以看到主屏幕上的图像。我正在使用这个code用于滑动抽屉。 简而言之,我有两个一对一的 View ,我想从第二个 View 中看到第一个 View 的图片。
最佳答案
你必须使滑动抽屉的内容部分透明,你可以这样做;
<SlidingDrawer android:id="@+id/slider"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:handle="@+id/handle" android:content="@+id/content"
android:background="#eeffae" >
<ImageView android:id="@+id/handle" android:layout_width="55dp"
android:layout_height="55dp" android:src="@drawable/handle" />
<LinearLayout android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/content"
android:orientation="vertical" android:background="@null">
...
...
</LinearLayout>
</SlidingDrawer>
关于java - android中的透明 View ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14418926/