首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

Android Layout布局上的图片怎么突破背景图

2013-09-28 
Android Layout布局上的图片如何突破背景图已经实现的效果代码如下,图标图片突破不出背景图啊,请问如何实

Android Layout布局上的图片如何突破背景图

已经实现的效果
Android Layout布局上的图片怎么突破背景图

代码如下,图标图片突破不出背景图啊,请问如何实现
<FrameLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/list_company_item"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/bg_company_item"
        android:layout_margin="30dp">
    <TableLayout
        android:layout_height="wrap_content"
        android:layout_width="fill_parent"
        android:layout_gravity="center_vertical">
        <TableRow>
            <ImageView
                android:src="@drawable/icon_item"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                />
        </TableRow>
    </TableLayout>
</FrameLayout> 布局 layout android
[解决办法]
android:layout_maginleft = "-xxx"
[解决办法]
android:layout_maginleft ="-20dp"
但是需要看你具体的情况而且需要在线性布局中效果最好
[解决办法]
在editText代码中加入
android:drawableLeft="@drawable/ic"
""里是你要加入的图片
[解决办法]
android:layout_maginleft = "-20dp"
-20是代表向左移肯定会有问题的啊,
改为
android:layout_maginleft = "20dp"应该就可以了,LZ试一下吧

热点排行