clcurie_11 2013-08-27 02:25 采纳率: 6.7%
浏览 3620

android背景图片可以在Eclipse中显示但是不能在仿真器中显示

我创建了一个背景图片,然后给下拉文件夹(low, med, high resolution)的每一项添加一个图像的副本,然后在 main.xml 中定义下面的代码:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <RelativeLayout
        android:id="@+id/relativeLayout1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_weight="0.57" 
        android:background="@drawable/scrollviewtexture">

        <TextView
            android:id="@+id/textView1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="90dp"
            android:text="Memorable"
            android:textAppearance="?android:attr/textAppearanceMedium" android:typeface="sans"/>

        <TextView
            android:id="@+id/textView2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/textView1"
            android:layout_centerHorizontal="true"
            android:text="(Swipe To Generate Password)"
            android:textAppearance="?android:attr/textAppearanceSmall" android:textSize="5pt"/>

    </RelativeLayout>

</LinearLayout>

在Eclipse中显示背景图片没有问题,但是当我在仿真器中运行时不显示,哪里出错呢?

  • 写回答

2条回答 默认 最新

  • 码密码密哄 2013-08-27 09:09
    关注

    把RelativeLayout中的android:layout_weight="0.57" 去掉看看

    评论

报告相同问题?

悬赏问题

  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?
  • ¥15 matlab(相关搜索:紧聚焦)
  • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计
  • ¥15 Arduino无法同时连接多个hx711模块,如何解决?