首页 > 系统 > Android > 正文

android Imageview 图片覆盖具体实现

2019-10-24 20:58:35
字体:
来源:转载
供稿:网友
android Imageview 图片覆盖实现及注意事项如下,感兴趣的朋友可以参考下哈
 
复制代码代码如下:

<RelativeLayout 
xmlns:android="http://schemas.android.com/apk/res/android" 
android:id="@+id/gallerylayout" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent"> 
<Gallery 
android:id="@+id/overview" 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
/> 
<ImageView 
android:id="@+id/navigmaske" 
android:background="#0000" 
android:src="@drawable/a2" 
android:scaleType="fitXY" 
android:layout_alignTop="@id/overview" 
android:layout_alignBottom="@id/overview" 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
/> 
</RelativeLayout> 

注意: 
复制代码代码如下:

<SPAN style="FONT-SIZE: 18px"><RelativeLayout 
xmlns:android="http://schemas.android.com/apk/res/android" 
android:id="@+id/gallerylayout" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent"> 
<Gallery 
android:id="@+id/overview" 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
/> 
<ImageView 
android:id="@+id/navigmaske" 
android:background="#0000" 
android:src="@drawable/a2" 
android:scaleType="fitXY" 
android:layout_alignTop="@id/overview" 
android:layout_alignBottom="@id/overview" 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
/> 
</RelativeLayout></SPAN> 

android:background="#0000" 
android:src="@drawable/a2" 
注意这两个就行了图片是png透明的

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表