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" 去掉看看

    评论

报告相同问题?

悬赏问题

  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?