首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在android中去除图片的白色背景

在android中去除图片的白色背景
EN

Stack Overflow用户
提问于 2015-01-05 19:24:29
回答 1查看 9.8K关注 0票数 1

我在android.But的框架布局中添加了一个内部图像,事情是我得到了一个白色的背景。我需要删除白色Background.Any帮助将不胜感激.....

截图如下所示

xml文件如下所示

代码语言:javascript
复制
<?xml version="1.0" encoding="UTF-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <ImageView  
        android:id="@+id/imageView"
        android:layout_width="fill_parent" 
        android:layout_height="fill_parent" 
        android:scaleType="center"
         />

    <ImageView
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_gravity="left"
        android:background="@null"
        android:maxWidth="-5dp"  
        android:maxHeight="-5dp"
        android:src="@drawable/driveimg"
         />

</FrameLayout>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-01-05 19:25:39

可以将背景设置为空(android:background="@null")或使用透明色(android:background="@android:color/transparent")

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27778512

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档